Re: A variation of Allen’s Class Definition Pattern
brendan at mozilla.com
Sun Sep 25 22:07:50 PDT 2011
On Sep 25, 2011, at 9:20 PM, John J Barton wrote:
> On Sun, Sep 25, 2011 at 8:18 PM, Brendan Eich <brendan at mozilla.com> wrote:
>> ... and it is imperative as all get-out.
> I realize this is supposed to be common knowledge, but I would
> appreciate a pointer to why 'imperitive' gets listed as a negative. In
> my experience declarative is only good for toy programs. Maybe I am
> mixing up 'declarative language' and 'declarative syntax in a
I think so.
JS functions are declarative forms. They have binding effects before evaluation of expressions and statements in the containing function or program. This is a good thing.
Object and array literals in ES5 and reality are expression forms but compound, with declarative aspects: the property names are compile-time constants, the newborn object or array cannot escape and be witnessed partially initialized, prototype setters or proxies cannot intercept initializing assignments. These are good things.
JS is multi-paradigm.
More information about the es-discuss