OK, thanks for the info.  A couple of notes in-line..

On 9/18/15, 4:56 PM, "Josh Tynjala" <joshtynj...@gmail.com> wrote:

>
>However, the first one could be rewritten like this, where it's a
>variable,
>which must be an "identifier" instead of an "identifier name":
>
>var identifierName = function() {} //error because identifier names are
>not
>allowed!

I guess that sort of makes sense.  Maybe the places where identifier names
are allowed are because access to those things requires obj.prop format
(and thus, obj[“prop”]), but local variables get accessed without some
owning object and thus can be ambiguous with reserved words.

>
>If classes are considered syntactic sugar for prototypes, then the AS3
>version might be considered to be equivalent to this:
>
>MyClass.prototype.identifierName = function() {}
>
>We can rewrite that one with quotes, so the original sugar seems safe as
>an
>"identifier name", assuming that AS3 should follow the same logic.
>
>MyClass.prototype["identifierName"] = function() {}

I am not a language person, but I have a faint memory of the language guys
saying that AS3 methods are not syntactic sugar for prototype functions.
It might have to do with the fact they are closures, and not assignable at
runtime.

-Alex

Reply via email to