Jussi Kalliokoski jussi.kalliokoski at gmail.com
Wed Mar 14 12:36:45 PDT 2012

Pitching in a bit. Heh, its seems to me like a lot of people will be happy
when/if we eventually get macros in.

If this is really a too long word to type or takes too many characters (I'm
not saying it is, I don't really have an opinion on... this.), what about
this (may be flat out stupid, but just throwing it out there):

.aPropertyOfThis = something;

Obviously this requires a semicolon before it to work, but at least it
seems pretty obvious to me what it does. At first glance it seems to me
it's LR (1) compatible as well, so no prob there. Of course it can't
replace 'this' when you're not referring to a property.

Another option, to avoid forced semicolons:

..aPropertyOfThis = something;

But this can't have an non-float number before it, without semicolon. I
don't think it's a big problem though.

If you want to reference this directly, maybe something like this:

Dog.prototype.barkAt.call(., neighbour);


Mole.prototype.plant.call(.., neighbour.backyard);

But those look quite a bit funky and scary to me, resemble typos too much.


On Wed, Mar 14, 2012 at 9:21 PM, Kevin Smith <khs4473 at gmail.com> wrote:

> Thanks, Allen.  I understand the issues better now.
>> Same goes for Java and C# where the this is optional.  Using some sort of
>> marker symbol (such as @foo as an abbreviation of this.foo) helps the
>> reader distinguish self calls from regular function calls but it is
>> debatable whether that grawlix form is as readable than a simple this.foo.
> It would be interesting (although perhaps not feasible) to do readability
> studies on these and other syntax matters.
> kevin
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120314/ff627cf3/attachment.html>

More information about the es-discuss mailing list