[V4REV] Advice 2 about func names

Ruslan Zasukhin sunshine at public.kherson.ua
Fri May 13 08:34:58 CDT 2005


On 5/13/05 2:23 AM, "Robert Brenstein" <rjb at robelko.com> wrote:

>> For example:
>> 
>>         get Valentina_Init( 8 * 1024 * 1024 )
>>         get Valentina_ShutDown()
>> 
>> Instead of
>>            
>>         get Valentina( "Init", 8 * 1024 * 1024 )
>>         get Valentina( "ShutDown" )
>> 
> 
> I am ambivalent about this, personally. On one hand, it will make
> Valentina appear more integrated with Rev and may be a tad less
> typing, but on the other hand, it will reduce flexibility for
> factoring code since these new functions will have to be hard coded.
> In some of my projects I am using adaptor (wrapper) functions, and
> being able to pass Valentina functions as parameters is quite handy.
> 
> 
>> ----------------
>> Also we can have in 2.x not only Valentina prefix but
>> 
>>    put VDatabase_CreateTable( "person" ) into personRef
>> 
>>    put VTable_CreateStringField( personRef, "Name", 50, fIndex + fUnique )
>>     into fldRef
>> 
>> 
>> Instead of
>> 
>>    put Valentina( "VDatabase_CreateTable", "person" ) into personRef
>> 
>>    put Valentina( "VTable_CreateStringField", personRef, "Name", 50,
>>         fIndex + fUnique ) into fldRef
>>    
>> 
>> Do you like new syntax ?
> 
> Not to rain on the parade but IMHO this increases chances of name
> conflicts beyond comfortable and makes the code less
> self-documenting. I rather type a few chars more.

How this can raise name conflicts ???
All our funcs will start with V and have db specific words
    database, table, field, ...

> I sure hope you will let us to continue using
> Valentina("function",...) as it is now even if you go ahead with
> these new calls. Aside the above points, having to recode some of my
> bigger and older projects would be a big job.
> 
> I also wonder about increased effort for you to maintain those new
> functions, particularly when adding new functions. Won't you need to
> have a series of externals instead of a single one? Or are you
> planning to have a Valentina library that defines those as passthru
> functions to the external?

Robert, to use new style, we have NO efforts.
We remove then some overhead code of 1.x which was here to make it
compatiable to xCards.

New functions also will make it faster, because now I remove own layer of
mapping of function names.

I should not do nothing special. This is supported by Revolution SDK.
I wonder why before I was pointed into single name direction...
May be xCards cannot do this in other way ...

-- 
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