Program configuration [Was: class prototype object vs class instance properties]

Jeff Dyer jodyer at
Mon Aug 20 21:58:50 PDT 2007

We considered using ordinary control flow constructs for program
configuration but in the end decided to use a purely attribute based
mechanism for that purpose. Given that we were using configuration
attributes on definitions and members of object and array literals,
extending their use to blocks seemed consistent and natural. Also, we
thought giving a compile time meaning to if-else might make programs
harder to read. But if you do like Java and limit the feature to
compiling out statements, then using if-else syntax might be just fine.


> -----Original Message-----
> From: P T Withington [mailto:ptw at]
> Sent: Monday, August 20, 2007 11:17 AM
> To: Jeff Dyer
> Cc: Brendan Eich; Garrett Smith; es4-discuss at
> Subject: Program configuration [Was: class prototype object vs class
> instance properties]
> On 2007-08-20, at 13:21 EDT, Jeff Dyer wrote:
> > ActionScript will have something like this soon in its program
> > configuration feature. It is described here:
> >
> >
> Interesting that you rejected the use of Javascript control flow for
> configuration.  That is what we use in LZX.  Effectively we just
> require that if statements involving configuration variables be
> optimized at compile time.  (We don't currently permit expressions on
> configuration variables and we don't have a language for defining
> configuration variables.)  The benefit we saw is that the programmer
> does not need to learn anything new to understand configuration.

More information about the Es4-discuss mailing list