One thing that has come up in my number crunching is the repetition of the
character sequence "this.".  If we allowed @ (ala CoffeeScript) as a
shorthand for "this.", then we could, if nothing else, shave perhaps 1-3%
off of the size of minified code.

Other advantages:

- A pain point for doing OO programming in javascript is the required
"this" repetition.  A shorthand would alleviate that pain.
- If private names are allowed as the "name" in @name, then we would have
a concise syntax for private "member" access.

See this example <https://gist.github.com/2007371>. (This example describes
a hypothetical class syntax, which I'm not proposing in this thread.  But
it does illustrate the @name concept.)

kevin
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to