[V4REV] Constants. Plan 2.
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Jun 20 10:28:27 CDT 2005
Hi All,
Let me describe again what we have agree.
* Revolution do not have enums. And it do not have constants.
* It is bad idea that external born many global constants or even single
global array with constants.
* Revolution is string - oriented language. So we will define constants as
strings.
----------------------------
* All our docs examples and examples stacks will be corrected to always use
double quotes around string constants.
This is short notation of constant
VDatabase_Create( dbRef, path, "kDsc_Dat_Blb_Ind", 32 * 1024 )
This is verbose notation of constant
VDatabase_Create( dbRef, path, "EVMode.kDsc_Dat_Blb_Ind", 32 * 1024 )
This is another one verbose notation of constant, where instead of DOT is
used underscore. In this particular example we see why underscore can be
bad.
VDatabase_Create( dbRef, path, "EVMode_kDsc_Dat_Blb_Ind", 32 * 1024 )
----------------------------
* We assume that 99-100% of Revolutioners will simply to use short
notation....
Ak....may be just forget about ENUM names ....
Just future it is always simpler if you and we will tell:
I use constant of EVDbMode
I.e. We will have some kind of terminology.
----------------------------
*** Again, now our docs and examples sometimes skip double quotes.
we have to think this is bad idea, because AT LEAST one place
require quotes always: when you will specify field flags.
Create_VarChar( name, 1022, "fIndexed + fIndexByWords" )
Note can be use + COMA SPACE as delimiters.
So we have decide that AT LEAST our docs and exmaples should be consistent,
and always to use double quotes.
-----------------------------
* About support of numeric values for ENUM types.
I think it is good idea DO NOT allow this. Because numeric constant is NOT
readable for developer. We have a lots of constants, and I think nobody can
memories them.
--
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-beta
mailing list