I get that decorators "can" perform the same task, but these are features that are standard in the language today. Once we start defining data properties on classes, there will be an immediate need to define the attributes of those properties. Yes, decorators can fill the need, but unless a standard library is provided to perform these tasks, there will certainly be multiple different takes on how such decorators should work. By defining them directly into the language like this, not only do we get a well defined approach to declaring properties with the desired attributes, but we avoid the additional complexity of decorator implementation for an otherwise trivial task.
...at least, that's how I'm thinking of it. I'm also working on 1 last proposal, proposal-class-modifiers with the intent of adding `abstract` and `final` to class declarations where `abstract class` would prevent instantiation of the class and `final` class would prevent inheritance of the class. On Sun, Dec 2, 2018 at 2:31 AM Isiah Meadows <[email protected]> wrote: > For one token (+ an import) more, you could use decorators instead. > And BTW, it's been suggested already that a standard decorator library > should exist, just IIUC (I'm not part of TC39) it's not yet determined > what should be in it. > > ----- > > Isiah Meadows > [email protected] > www.isiahmeadows.com > > On Sun, Dec 2, 2018 at 2:25 AM Jacob Pratt <[email protected]> wrote: > > > > I'm of the opinion this is what decorators are for. > > > > On Sun, Dec 2, 2018, 01:49 Ranando King <[email protected] wrote: > >> > >> Since some form of data is going to land in ES class syntax, it would > be a good idea if the capabilities of a property descriptor were also > exposed for all public properties. > >> > >> https://github.com/rdking/proposal-common-member-modifiers > >> _______________________________________________ > >> es-discuss mailing list > >> [email protected] > >> https://mail.mozilla.org/listinfo/es-discuss > > > > _______________________________________________ > > es-discuss mailing list > > [email protected] > > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

