7 ms·
The difference, though, is that the sweet.js example of classes aims to implement something that is traditionally a language feature. APIs tend not to do this.
by jarrett 13y ago
The difference, though, is that the sweet.js example of classes aims to implement something that is traditionally a language feature. APIs tend not to do this.
You might argue that the distinction between APIs and language features is arbitrary. But I'd say there is a meaningful difference. An API helps you tackle a particular problem domain, such as making an HTTP request, communicating over a USB port, or writing an image. Whereas a language feature is much more generic. It's not limited to any particular problem domain. Rather, it cuts to core of how we express problems in general.
If we're all ostensibly writing JavaScript, I don't think we should be using multiple, incompatible variants of the same language features.
- deleted 13y ago[deleted]