Re: ES4 overview paper released

2007-10-22 Thread John Cowan
Lars T Hansen scripsit: > (Apparently the original post was lost.) No, both copies came through. -- MEET US AT POINT ORANGE AT MIDNIGHT BRING YOUR DUCK OR PREPARE TO FACE WUGGUMS John Cowan [EMAIL PROTECTED] http://www.ccil.org/~cowan ___ Es

ES4 overview paper released

2007-10-22 Thread Lars T Hansen
(Apparently the original post was lost.) I'm pleased to present you with an overview paper describing ES4 ast he language currently stands. TG1 is no longer accepting proposals, we're working on the ES4 reference implementation, and we're expecting the standard to be finished in October 2008. Th

Re: Object.prototype.clone

2007-10-22 Thread Peter Michaux
On 10/21/07, Kris Zyp <[EMAIL PROTECTED]> wrote: > >> http://javascript.crockford.com/prototypal.html > It is the act of creating a object that inherits from/delegates to the > provided object. Peter is suggesting sugar for one of the important > mechanisms in a prototypal language. I believe the "

ES4 overview paper released

2007-10-22 Thread Lars T Hansen
I'm pleased to present you with an overview paper describing ES4 as the language currently stands. TG1 is no longer accepting proposals, we're working on the ES4 reference implementation, and we're expecting the standard to be finished in October 2008. The paper is available at http://www.ecmascr

Re: Questions on the notation used in the spec

2007-10-22 Thread John Cowan
Jeff Dyer scripsit: > Alpha, beta, etc are a short-hand for describing similar productions. They > can be expanded by replicating the parameterised production for each value > in the corresponding set. E.g. > >A(alpha) := B(alpha) > > can be rewritten as: > >A_allowColon := B_allowColon

Re: Questions on the notation used in the spec

2007-10-22 Thread Jeff Dyer
On 10/22/07 10:40 AM, Joel Reymont wrote: > Folks, > > I'm trying to create a Yacc grammar for ES4 and I have trouble > understanding the notation used in the spec. > > For example, there's > > alpha = { allowColon, noColon } > beta = { allowIn, noIn } > gamma = { allowExpr, noExpr } > > an

Re: instanceof Operator

2007-10-22 Thread Brendan Eich
On Oct 22, 2007, at 4:53 AM, P T Withington wrote: >> String has its uses, not just embedded in content that requires >> compatibility: string and String inter-convert, String is non-final, >> and the two share a prototype object. > > I think Dylan would have made String an open subclass of the se

Questions on the notation used in the spec

2007-10-22 Thread Joel Reymont
Folks, I'm trying to create a Yacc grammar for ES4 and I have trouble understanding the notation used in the spec. For example, there's alpha = { allowColon, noColon } beta = { allowIn, noIn } gamma = { allowExpr, noExpr } and then ParenExpression ( AssignmentExpression /allowColon, allowI

Re: is ES4 getting too bloated?

2007-10-22 Thread Lars T Hansen
Thank you... --lars On 10/22/07, liorean <[EMAIL PROTECTED]> wrote: > On 22/10/2007, Brendan Eich <[EMAIL PROTECTED]> wrote: > > Give the overview at http://www.ecmascript.org/es4/spec/overview.pdf > > a read and let us know what you think. > > > Page 17: "In addition, any value in the language c

Re: is ES4 getting too bloated?

2007-10-22 Thread liorean
On 22/10/2007, Brendan Eich <[EMAIL PROTECTED]> wrote: > Give the overview at http://www.ecmascript.org/es4/spec/overview.pdf > a read and let us know what you think. Page 17: "In addition, any value in the language converts to a member of AnyBoolean (undefined, null, zero, and the empty string c

Re: instanceof Operator

2007-10-22 Thread Lars T Hansen
On 10/22/07, P T Withington <[EMAIL PROTECTED]> wrote: > IWBNI there were a single test for string-ness. In ES3, you have to > say: > >typeof x == 'string' || (typeof x == 'object && x instanceof String) > > Am I right in thinking that in ES4 you will be able to say: > >x is string > > to

es4-discuss@mozilla.org

2007-10-22 Thread Simon Pieters
In IE, Firefox, Opera and Safari, the character sequence as a line comment, too, but that IE and Opera don't. Some demos: http://tc.labs.opera.com/ecmascript/html-comments/ Is this something that can be specced in ES4? Or is the intent to require UAs to have a switch such that they can

Re: is ES4 getting too bloated?

2007-10-22 Thread Lars T Hansen
On 10/22/07, zwetan <[EMAIL PROTECTED]> wrote: > On 10/22/07, Brendan Eich <[EMAIL PROTECTED]> wrote: > > I know of two industry-scale implementations under way, in addition > > to Mozilla's Tamarin project, and Michael O'Brien (mbedthis.com), all > > implementing ES4 in the next six to nine months

Re: instanceof Operator

2007-10-22 Thread P T Withington
On 2007-10-21, at 15:20 EDT, Brendan Eich wrote: > On Oct 21, 2007, at 11:48 AM, Jeff Dyer wrote: > >>> The wrapper classes String, Number, Boolean are similar to the >>> (primitive) values they wrap, but they're not really related to >>> those >>> value types in a type sense, and in ES4 the wra

Re: is ES4 getting too bloated?

2007-10-22 Thread zwetan
On 10/22/07, Brendan Eich <[EMAIL PROTECTED]> wrote: > I know of two industry-scale implementations under way, in addition > to Mozilla's Tamarin project, and Michael O'Brien (mbedthis.com), all > implementing ES4 in the next six to nine months. There's no reason, > zero, apart from will to do some

Re: Object.prototype.clone

2007-10-22 Thread Garrett Smith
cloneObject( this ); // Error if this is window. // enumeration is partially broken in IE, this loop will sometimes fail for( var property in srcObj ) On 10/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have clone objects like this: > //

Re: Object.prototype.clone

2007-10-22 Thread Eugen.Konkov
I have clone objects like this: // function cloneObject( srcObj ) { if( srcObj == null ) { return srcObj; } //undefined or null var newObject; switch( typeof(srcObj) ) { case "object": newObject = new srcObj.constructor(); f

Fwd: Drop JSON from the language?

2007-10-22 Thread Garrett Smith
On 10/12/07, Robert Sayre <[EMAIL PROTECTED]> wrote: > I think this feature might be better to add as a library. I'm working > on a patch for Mozilla that provides a native JSON implementation like > so: |new JSON()|. I had been basing the API on Bob's python simplejson > API, but it looks like Goo

Re: Object.prototype.clone

2007-10-22 Thread Lars T Hansen
With the proviso that the program unit proposal has still to be fully specified and debugged, I believe the following should work: Somewhere: unit Beget { internal package Beget { Object.prototype.beget = function (o) { /* what you expect */ } Object.prototype.propertyIsEnumer