brendan at mozilla.org
Wed Mar 26 17:13:52 PDT 2008
On Mar 26, 2008, at 4:47 PM, Ric Johnson wrote:
> On 3/26/2008, "Brendan Eich" <brendan at mozilla.org> wrote:
>> This is reductionism, therefore between silly and wrong,
> Can you explain the above fragment?
The whole of a language is more than the sum of its parts. The lambda
calculus is enough for computation but no one wants to use only it.
Danny Hillis built a computer from tinkertoys once...
>> * you can't make read-only properties in ES3;
> I think I can!
> but is the intention sugar or hacker proof?
>> *you can't make don't-delete properties of plain old objects (only
>> vars in closures);
> Again, I can make it pretty darn hard to remove privledged fields
> killing the tree,
>> * you can't make objects that cannot be extended;
> This may be true. But I think the crazy guy that invented
> livescript did
> this to allow the power of prototype and redefine the Object/ Function
> constructors actually had a good idea: JS is not a CLASSical language.
That does not solve problems where integrity matters more than it
does for the obvious use-cases I had in mind in favoring mutability.
>> * you can't yield from a function to its caller, saving state
>> automatically in local variables, and send a value back to the
>> suspended activation of that function.
> I actually have a hack that used recursion, a global hash, timers, and
> closures that effectively did YIELD (and it worked most of the time
I don't think you read what I wrote: save local variables, resume the
same function activation. Sure, you can implement state machines with
other techniques, which are ugly and hard to use by comparison :-P.
More information about the Es4-discuss