Re: const classes for max/min

2012-05-29 Thread Herby Vojčík
Allen Wirfs-Brock wrote: On May 24, 2012, at 1:50 PM, Erik Arvidsson wrote: I think it is impossible to achieve Waldemar's goal with syntactic sugar only. I also don't think that is reason enough to block ES6 classes. The requirements he wants cannot be expressed with ES5 semantics. I'm

Re: const classes for max/min

2012-05-25 Thread Axel Rauschmayer
Couldn’t #1 (optionally) be handled via a proxy and #2+#3 via static analysis? On May 24, 2012, at 22:50 , Erik Arvidsson wrote: I think it is impossible to achieve Waldemar's goal with syntactic sugar only. I also don't think that is reason enough to block ES6 classes. The requirements he

Re: const classes for max/min

2012-05-25 Thread Brendan Eich
Axel Rauschmayer wrote: Couldn’t #1 (optionally) be handled via a proxy and #2+#3 via static analysis? Don't bring up proxies as a solution here! Direct proxies require target objects, which are both irrelevant and unacceptably high overhead. /be

Re: const classes for max/min

2012-05-25 Thread Allen Wirfs-Brock
On May 24, 2012, at 1:50 PM, Erik Arvidsson wrote: I think it is impossible to achieve Waldemar's goal with syntactic sugar only. I also don't think that is reason enough to block ES6 classes. The requirements he wants cannot be expressed with ES5 semantics. I'm actually rather this

const classes for max/min

2012-05-24 Thread Russell Leggett
Waldemar has put a pretty firm line in the sand regarding the need for a higher integrity class construct. While I would love to start by agreeing on max/min as a safety syntax and iterating forward, I appreciate the desire for such a construct and would probably use it myself. It seems to me that

Re: const classes for max/min

2012-05-24 Thread Axel Rauschmayer
Various thoughts: - One key question: Does a property declaration have to look declarative in order to be used declaratively? You are saying no. - One could have `public foo = ...` as syntactic sugar for `this.foo = ...`. But then the issue is whether `private` will ever be used in an

Re: const classes for max/min

2012-05-24 Thread Russell Leggett
On Thu, May 24, 2012 at 3:53 PM, Axel Rauschmayer a...@rauschma.de wrote: Various thoughts: - One key question: Does a property declaration have to look declarative in order to be used declaratively? You are saying no. I think a more declarative form could be added later, this is not future

Re: const classes for max/min

2012-05-24 Thread Axel Rauschmayer
- One key question: Does a property declaration have to look declarative in order to be used declaratively? You are saying no. I think a more declarative form could be added later, this is not future hostile to that. It looks OK to me. However, adding another form later seems like a bad

Re: const classes for max/min

2012-05-24 Thread Erik Arvidsson
I think it is impossible to achieve Waldemar's goal with syntactic sugar only. I also don't think that is reason enough to block ES6 classes. The requirements he wants cannot be expressed with ES5 semantics. The big issues Waldemar wanted were (as far as I remember): 1. Reading a non existent

Re: const classes for max/min

2012-05-24 Thread Russell Leggett
On Thu, May 24, 2012 at 4:27 PM, Axel Rauschmayer a...@rauschma.de wrote: - One key question: Does a property declaration have to look declarative in order to be used declaratively? You are saying no. I think a more declarative form could be added later, this is not future hostile to that.

Re: const classes for max/min

2012-05-24 Thread Russell Leggett
On Thu, May 24, 2012 at 4:50 PM, Erik Arvidsson erik.arvids...@gmail.comwrote: [snip] The problems with these is that no other dynamic language has these kind of requirements. JS developers get by without them today. If we designed a new language I think they would be nice features to have

Re: const classes for max/min

2012-05-24 Thread Rick Waldron
On Thursday, May 24, 2012 at 5:36 PM, Russell Leggett wrote: On Thu, May 24, 2012 at 4:50 PM, Erik Arvidsson erik.arvids...@gmail.com (mailto:erik.arvids...@gmail.com) wrote: [snip] The problems with these is that no other dynamic language has these kind of requirements. JS