Insurrection (was: ES4 draft: Object)

Geoffrey Garen ggaren at apple.com
Mon Mar 10 23:31:22 PDT 2008


>> ES3 has several abstraction mechanisms:
>> * lambda abstraction, which it gets approximately as right as Scheme!
>> * objects as a generalization of records, which has some pros and  
>> cons
>> * prototype-based sharing of common behavior, which is used almost
>> exclusively by JavaScript programmers to express only class-like
>> patterns.
>>
>> Altogether, ES3 has many virtues and many problems. One of its great
>> virtues is its almost perfect support for lexical nesting. Virtually
>> any thisless construct that could appear at top level can also appear
>> within a nested lexical context with the same meaning. ES3 also  
>> avoids
>> the CommonLisp trap of multiple namespaces, instead siding with
>> Scheme's single namespace approach.
>>
>> Even ignoring ES4's type system, ES4 adds all the following
>> abstraction mechanisms to those in ES3:
>> * classes
>> * packages
>> * units
>> * namespaces
>
> You forgot interfaces (and the type system also adds record types,
> (sort-of)-tuples, typed arrays and parametric types). That does seem
> like a lot.

There are also like / wrap types.

Geoff



More information about the Es4-discuss mailing list