Re: Proxy-induced impurity of internal methods

2011-10-06 Thread Andreas Rossberg
On 6 October 2011 06:34, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Oct 5, 2011, at 9:57 AM, Andreas Rossberg wrote: In summary, I'm slightly worried. The above all seems fixable, but is that all? Ideally, I'd like to see a more thorough analysis of how the addition of proxies affects

Re: On I got 99 problems and JavaScript syntax ain't one (was: OnIncremental Updates)

2011-10-06 Thread Andrea Giammarchi
as Zend Certified Engineer I can say == and === have never been a problem ... also there are cases when I *want* coercion! var False = new Boolean(false); if (False) alert(You may say WTF); if (False == false) alert(I may say feature); Best Regards, Andrea Giammarchi

Re: traits feedback

2011-10-06 Thread Mark S. Miller
On Thu, Oct 6, 2011 at 5:44 AM, Brendan Eich bren...@mozilla.com wrote: [...] We want only own properties, including private-name-object-keyed ones. I agree that .{, being a special form with a literal to the right, should copy private-name keyed properties from right to left. However, doing

Re: On I got 99 problems and JavaScript syntax ain't one

2011-10-06 Thread Claus Reinke
You mean by deprecate what, exactly? Web JS is full of var. Making any attempt to migrate a big hunk of it to ES6 require replacing all 'var' with 'let' is a huge tax, since scoping works differently. Ok, how about saying if you use 'let' in a function or at top level, you can no longer use

Re: Proxy-induced impurity of internal methods

2011-10-06 Thread Andreas Rossberg
On 5 October 2011 21:00, Andreas Rossberg rossb...@google.com wrote: On 5 October 2011 18:57, Andreas Rossberg rossb...@google.com wrote: FIXING PROXIES A particularly worrisome side effect is fixing a proxy. The proxy semantics contains a lot of places saying If O is a trapping proxy, do

Re: traits feedback

2011-10-06 Thread John J Barton
On Wed, Oct 5, 2011 at 10:37 PM, Brendan Eich bren...@mozilla.com wrote: On Oct 5, 2011, at 9:02 PM, John J Barton wrote: PrototypeJS (and Firebug) pre-date Object.keys() and .hasOwnProperty(), hasOwnProperty was in ES3 in 1999. PrototypeJS is IIRC 2005-era. Firebug is post-y2k. so

Re: traits feedback

2011-10-06 Thread Quildreen Motta
2011/10/6 John J Barton johnjbar...@johnjbarton.com On Wed, Oct 5, 2011 at 10:37 PM, Brendan Eich bren...@mozilla.com wrote: On Oct 5, 2011, at 9:02 PM, John J Barton wrote: PrototypeJS (and Firebug) pre-date Object.keys() and .hasOwnProperty(), hasOwnProperty was in ES3 in 1999.

Re: traits feedback

2011-10-06 Thread Brendan Eich
On Oct 6, 2011, at 8:06 AM, John J Barton wrote: On Wed, Oct 5, 2011 at 10:37 PM, Brendan Eich bren...@mozilla.com wrote: On Oct 5, 2011, at 9:02 PM, John J Barton wrote: PrototypeJS (and Firebug) pre-date Object.keys() and .hasOwnProperty(), hasOwnProperty was in ES3 in 1999.

Re: String concatenation

2011-10-06 Thread Brendan Eich
On Oct 5, 2011, at 9:10 AM, Axel Rauschmayer wrote: The two concatenation approaches I know of are: 1. via += 2. push() into an array, join() it after the last push() (1) can’t possibly be efficient, Huh? Engines have optimized the hell out of 1 by essentially doing 2 under the hood.

Re: Re: Grawlix

2011-10-06 Thread Douglas Crockford
On 11:59 AM, John J Barton wrote: GrawlixScript is the connection I guess. No, grawlix is a term of art that can be used to describe some the literal syntax proposals. ___ es-discuss mailing list es-discuss@mozilla.org

Re: Grawlix

2011-10-06 Thread Quildreen Motta
On 06/10/11 19:56, John J Barton wrote: Recent syntax discussions head in a completely different direction, introducing a seemingly large number of new symbols resulting in code that isn't readable by current JS, Java, or C devs. Instead of JavaScript they will be attempting to read

Re: String concatenation

2011-10-06 Thread Wes Garland
On 6 October 2011 14:09, Tom Schuster t...@schuster.me wrote: (1) is in fact really good optimized in modern engines. (In case you are interested search for Ropes: an alternative to strings) You don't even need ropes to make this fast for a lot of common cases. I think even a naive

Re: On I got 99 problems and JavaScript syntax ain't one (was: On Incremental Updates)

2011-10-06 Thread Brendan Eich
You are a gmail user, I surmise. So are others. Gmail collapses cited text, so you don't trim it. Those of us using other mail user agents then have to wade through *pages* of cited text to find your replies, which generally only apply to the last paragraph or two of the cited text. Any

Re: traits feedback

2011-10-06 Thread Andrew Dupont
On Oct 6, 2011, at 12:30 PM, Brendan Eich wrote: My point was that your PrototypeJS and Firebug pre-date .hasOwnProperty() chronology was wrong. Object.prototype.hasOwnProperty was around since ES3. It was not used in Prototype, but on the other hand, the never extend Object.prototype

Re: On I got 99 problems and JavaScript syntax ain't one (was: On Incremental Updates)

2011-10-06 Thread John J Barton
repeated with less quotation On Wed, Oct 5, 2011 at 2:25 PM, Russell Leggett russell.legg...@gmail.com wrote: On Wed, Oct 5, 2011 at 1:18 PM, John J Barton johnjbar...@johnjbarton.com wrote: On Wed, Oct 5, 2011 at 9:11 AM, Russell Leggett russell.legg...@gmail.com wrote:

Re: On I got 99 problems and JavaScript syntax ain't one (was: On Incremental Updates)

2011-10-06 Thread John J Barton
On Thu, Oct 6, 2011 at 6:40 PM, Brendan Eich bren...@mozilla.com wrote: You are a gmail user, I surmise. So are others. Gmail collapses cited text, so you don't trim it. Those of us using other mail user agents then have to wade through *pages* of cited text to find your replies, which

Object.extends (was Re: traits feedback)

2011-10-06 Thread John J Barton
On Thu, Oct 6, 2011 at 8:04 PM, Andrew Dupont mozi...@andrewdupont.netwrote: (Keep in mind that the 80% use-case for this sort of thing is merging default options with user-supplied options, at least in the code I write. That's a simple case that usually involves merging two plain objects

Re: Object.extends (was Re: traits feedback)

2011-10-06 Thread John-David Dalton
From: Andrew Dupont mozi...@andrewdupont.net JJB has it mostly right. When Sam wrote Object.extend (which was originally Object.prototype.extend), it didn't use hasOwnProperty; my guess is that Sam didn't know about it, because most of us were JavaScript amateurs back in the day, including