What is holding back Decorators ?
T.J. Crowder
tj.crowder at farsightsoftware.com
Tue Dec 4 16:24:46 UTC 2018
On Tue, Dec 4, 2018 at 3:47 PM Ranando King
<kingmph at gmail.com> wrote:
>
> Thanks for the links T.J.
Not me, it was 森建. I just supplied the corrected broken link from the
slides.
> ...though I'm a bit confused as to why they'd want to do `@dec export`.
> That makes it look like the `export` directive is the target of the
> decorator. Weird.
On Tue, Dec 4, 2018 at 4:00 PM Andrea Giammarchi
<andrea.giammarchi at gmail.com> wrote:
>
> FWIW I agree @dec export is a huge nonsense...
I agree with both of you. If the decorator decorates the class, it should
be after `export`, not before. I'm sorry if that means that there is a
bunch of code written with earlier Stage 1- and Stage 2- versions of
decorators that did it the other way, but that's not nearly a good enough
reason (IMHO) to do something so clearly non-intuitive and that breaks
parallel construction. RIght now, you say "If you want to export X, you put
`export` in front of it" (in the simple case). Breaking that for decorated
classes seems like a horrible idea.
TC39 is meeting this week. Here's hoping they come to resolution on this
stuff and, as is usually the case, a good one that makes sense.
-- T.J. Crowder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20181204/782a9c8a/attachment.html>
More information about the es-discuss
mailing list