|
From: Richard Cornford on 7 May 2008 03:00 Peter Michaux wrote: > On May 5, 4:26 pm, Richard Cornford wrote: > >> But anyone then asserting that, for example, the best way >> forward with Prototype.js would be to delete it and start >> again from scratch will be disregarded even if they think >> that advice is constructive (and it is virtually the only >> way that it would be possible to correct the mistake of >> violating the language's specification's injunction against >> using the '$' symbol as the initial character in Identifiers >> except when they were machine generated). > > ES3 spec: > > "The dollar sign is intended for use only in mechanically > generated code." > > Both "intended" and "mechanically generated" make the sentence > ambiguous. Not that ambiguous (and particularly with the word "only" in there). That sentence explains why a character that really did not need to be in the set of characters allowed in identifiers was included in that set. > It is only a recommendation at best. Yet the reaction to an almost identical assertion about Java identifiers in its specification results in Java programmers finding the idea of using a $ symbol unthinkable; something that only complete novices and armatures would do, and an error that would stamped out as soon as they got into a professional context. > Since ES is a spec that is based on existing implementations > and language use, I think the safe bet is that such a reservation > about $ in identifiers will be removed when ES4 is published. ES4 looks like it is going to be a serious (if predictable) mistake. How much of a mistake will not be clear until there is a specification to read. Richard. |