Hi,

out of curiosity: There are several places in ezc where strings are used
internally as kind of flags or enums:

- Column Types in ezcDatabaseSchema
- MvcTools
- ?

In contrast Sebastian used numeric constants in ezcWorkflow to indicate
different activation states of nodes:

    const WAITING_FOR_ACTIVATION = 0;
    const WAITING_FOR_EXECUTION = 1;

I thought, that using constants should be preferred, because
- the compiler tells you, if you mistyped a constants name
- comparing two integers is faster then comparing two strings(?)
- You have a central place, where you can lookup all possible values

Or is there anything I missed?

Thanks for your time reading this,
-- 
Thomas Koch, Software Developer
http://www.koch.ro

Young Media Concepts GmbH
Sonnenstr. 4
CH-8280 Kreuzlingen
Switzerland

Tel    +41 (0)71 / 508 24 86
Fax    +41 (0)71 / 560 53 89
Mobile +49 (0)170 / 753 89 16
Web    www.ymc.ch
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to