[Laszlo-dev] compilation properties, options, and environment

Benjamin Shine ben at laszlosystems.com
Sun Jan 14 20:47:14 PST 2007




The script compiler has two different collections-of-configuration-data:
org.openlaszlo.sc.Compiler.options (compilerOptions)
and
constants (org.openlaszlo.sc.Compiler.COMPILE_TIME_CONSTANTS).
The map containing the constants is pushed into a single slot in the  
options data structure, then pulled out when needed, and cast to be a  
Map again. That is goofy.

A same-same-but-different data structure is  
CompilationEnvironment.properties, but that has to do with the tag  
compiler, not the script compiler. Confusingly, these all represent  
some of the same information and some different information: whether  
to debug/profile and which runtime are specified in all three of  
these data structures. This looks confusing to me, and fragile.

I can refactor this cleanly using java 1.5-dependent language  
features -- collections, autoboxing, the for/in loop, type-safe enums.

Tucker, Jim, what do you think?
a) Not now
b) Let's see a more detailed proposal first
c) a & b



Benjamin Shine
Software Engineer, Open Laszlo / Laszlo Systems
ben at laszlosystems.com





More information about the Laszlo-dev mailing list