You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As for No. 2, our aim is to reveal the best of JavaScript, not support every aspect of it. The code example is only for completeness, to demonstrate that it is still possible to create getters and setters, though we discourage them in general as an antipattern.
Hey, thanks for correcting. I just found that you put plenty of thought on this already.
With my assumed limitation to argue against the decision, the only issue I do have when trying to avoid this pattern is when getting advanced visual effects to work with animation libraries (like in Framer and others). These libraries usually need to iterate on numeric properties, so getters and setters really come handy when building components... and I couldn't see how to use standard methods instead.
Thanks. If you look in the changelog for the 2.0.0 betas, you’ll see we also walled off calling freestanding functions named get or set so that it’s possible for us to revisit this later, without it being a breaking change. Basically, if there are too many interoperability issues with forcing people to either avoid getters and setters or to use the verbose syntax, we can “enable” the shorthand syntax without breaking any existing CS2 code.
This Coffeescript 2 "breaking change" drew my attention because of two situations:
- Doesn't it?
The text was updated successfully, but these errors were encountered: