[V4REV] symbolic constants // Based on Assoc Array
    Ruslan Zasukhin 
    sunshine at public.kherson.ua
       
    Mon May 16 17:31:35 CDT 2005
    
    
  
On 5/16/05 1:53 PM, "Robert Brenstein" <rjb at robelko.com> wrote:
>> Okay Robert.
>> Then what about next solution:
>> 
>> 1) Valentina define several global assoc array, to simulate enums of other
>> languages. Names will be again similar:
>> 
>>     EVDebugLevel
>>     EVDbMode
>>     EVFlags
>>     ...
>> 
>> And Now you can write
>> 
>>     SqlSelect(
>>         query, EVCursorLocation["kServerSide"], EVAccess["kReadWrite"] )
>> 
>> Only problem, I think this way will have slower access to constant values.
>> 
> 
> You seem to be back to defining globals behind our backs :)
This was before I have read you letter
 
> Associative arrays are fast, so they won't affect performance.
In fact they always bring some overhead because they act with strings.
> Having multiple globals IMHO is not beneficial. Actually, more
> trouble than benefit. As user, I have to remember not only the name
> of constant but also the name of global. I would rather have a single
> global.
> 
> On the other hand, as I suggested earlier (as option for future), you
> could offer an optional parameter, so we can get either the all 100+
> constants (if no param given) or just a subset corresponding to an
> enum.
> 
> put Valentina("Constants",[enum]) into var
> put Valentina_Constants([enum]) into var
> put valConstants([enum]) into var
> 
> Please consider seriously to let us decide what the variables are
> rather than presetting them for us. Sometimes doing less is better --
> more in the spirit of Transcript or xTalks in general. I know this is
> contrary to what you do (have to do) for others. But Transcript is
> not Lingo or Java.
> 
> With this approach, you can at least have the names of actual
> constants same as in other environments.
Yes, we will try this way Robert.
Only what I not like -- all constant values are in the same array
-- 
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
    
    
More information about the Valentina
mailing list