On 26/03/2012 18:13, Left Right wrote:
Martin: what particularly would bother me about such model is the energetic style (energetic as opposite of lazy). I.e. in your scenario {x: 200} object is created even before the first function runs. In case there is an error, creation of this object may not be necessary, but it was already created. This is why I mentioned Erlan-style processes, where the code that needs to be executed in response to a signal isn't evaluated until the signal is received.
Any configuration process is always bound to "unnecessary instantiation", if you instantiate things only when needed then you have to pay a lot of intention to what properties are available at what time.
A DSL for lazy operations has proven itself quite valuable as you can see from the various tweening apis they may be a little wasteful but ultimately result in more stable, flexible systems that are easier to read.
yours Martin.