There are new ASI hazards even with initializers, e.g., when preceding a generator method.
-
-
Replying to @littledan @wycats and
Yes, I agree. I don't see the point in splitting the rules up depending on presence of initializer. Standard.js can use newline sensitivity to protect if ASI; or TC39 could carve out ASI-off in class body. No third way.
1 reply 0 retweets 0 likes -
Replying to @BrendanEich @littledan and
Computed properties in class bodies make the calculus a little different for
@StandardJS - much harder to say "don't do that" when they're needed for symbol based protocols.1 reply 0 retweets 0 likes -
Replying to @wycats @BrendanEich and
Computed propreties don't complicate the basic no-semi rules. But StandardJS *will* have to be updated to recommend ; prefix in those cases.
1 reply 0 retweets 0 likes -
Replying to @spion @BrendanEich and
Part of the reason the ; prefix looks ok in other contexts is that it's rare and people code around having to do it. It's a little ironic that "semi-free" style turns the starting token for computed properties into ";["
1 reply 0 retweets 0 likes -
To me this just doesn't comes up in code solving business problems. I've always looked at classes and all the additions(private / public) as library author things, which I'm not doing. The extent I use classes and class properties is literally just React.
2 replies 0 retweets 0 likes -
Replying to @drewhamlett @spion and
I could believe that no-semi style overlaps a lot with not using classes or avoided new class features.
1 reply 0 retweets 0 likes -
I previously used Mobx a lot where you reach for classes(decorators also) to solve a lot of problems, and this just never came up honestly.pic.twitter.com/dcQNqKp11p
1 reply 0 retweets 0 likes -
-
Thanks, now think of how it would be ruined with semi colons.
1 reply 0 retweets 0 likes
Eh. As a Ruby and JS programmer, I get used to the "look" of code in different languages. I don't necessarily mind the semicolons but I also don't mind people using tools that make no-semi style work well for them.
-
-
Oh yea I totally get it, that was just a little jab. Haha.
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.