Quoting the Ecma-262: This standard specifies one departure from the grammar given in the Unicode standard: The dollar sign ($) and the underscore (_) are permitted anywhere in an identifier. The dollar sign is intended for use only in mechanically generated code.
Gabriel Gilini www.usosim.com.br [email protected] [email protected] On Fri, Jan 23, 2009 at 4:10 PM, kangax <[email protected]> wrote: > > On Jan 23, 10:11 am, Jan Hansen <[email protected]> wrote: > > I've been in the same problematic situation as well. However, we managed > > to use jQuerys noConflict mode in the 3'rd part component so that was > > great - but two questions: > > > > 1) > > Would it be possible to implement a noConflict mode in prototype? (why > > isn't there one already?) > > Because the actual philosophy of prototype.js goes somewhat against > such mode. There are quite few native and host objects being > augmented. There are also quite few global properties being created/ > modified. Eliminating all of that would take a good portion of what > prototype.js is all about. Such thing is also impossible to accomplish > without breaking backwards compatibility. There are plans to change > current approach in next major (backwards-incompatible) release but > it's not clear when it will be done and how it will be done. > > > > > 2) > > Why use the "$" per default? is it "by nature" of some javascript thing > > I havent realized - or is it just "by convention", aka could it have > > been "P" or "£" just as well? > > `$` is just one of the characters allowed to be part of (and a first > character) of `Identifier` (in other words, variable name) as per > ECMAScript specs. Back in the days when libraries "picked it up", it > was probably due to the fact that it looked distinguishable enough and > short enough for such frequently-used functionality (querying element > by id and/or extending element) > > [...] > > -- > kangax > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
