Re: Proposal For A New Alternative Keyword To “this” For Classes

john larson johnlarsondev1 at
Sat Mar 9 15:09:45 UTC 2019

Hi Bergi,

Thanks for your input. I believe that it would be a trivial task for
current static code analyzers to restrict usage of "this" for anyone opting
in to use this new keyword exclusively. But the same does not hold true for
other work-arounds such as arrow functions. And in addition to that, as you
mentioned, arrow functions might have their own problems. Wouldn't such an
alternative keyword be a good addition to our toolkit anyway?

Best Regards,


On Sat, Mar 9, 2019 at 5:18 PM Bergi <a.d.bergi at> wrote:

> Hi John,
> I don't think we do need another keyword for this. People would forget
> to use that new keyword instead of using this, just like they currently
> forget to use arrow functions.
> That said, your desired "behind-the-scenes implementation" can already
> be achieved easily with the class fields proposal and an arrow function.
> However, [there are many problems with that
> approach](
> )
> anyway.
> kind regards,
>   Bergi
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list