3 ms·
I'd almost guarantee that it's Typescript. But being a superset of Javascript, it's still correct to call it Javascript.
by nameiscubanpete 8y ago
I'd almost guarantee that it's Typescript. But being a superset of Javascript, it's still correct to call it Javascript.
- jorams 8y agoIt's really not. YAML is a superset of JSON, but you wouldn't call a YAML document a JSON document. The set of all colors is a superset of the set containing only orange, but calling every color orange makes no sense.
- pnloyd 8y agoI don't think it's exactly right to call it a superset either.. It adds types and constraints that have no effect on the resulting transpiled code besides an insurance that said type constraints are being met. To better illustrate what I mean, in the start of a Unix script you sometimes have them augmented with #!interpreter. But this extra contextual information is not a superset of the scripting language itself. Likewise Typescript is also an augmentation that lives within the code that provides contextual information to the Typescript transpiler itself, but does not necessarily effect the actuall produced JavaScript.
- nameiscubanpete 8y agoI see your point and not necessarily disagreeing, but noting the creators of typescript refer to it as a superset.
- kumarharsh 8y agoAll colours don't boil down to "orange" in Human eyes, so calling all colours orange really would be pointless. Typescript does compile down to JS, without which it can't even run. So yeah, when you're talking about the runtime or performance, Typescript === Javascript.
- golergka 8y ago> Typescript does compile down to JS, without which it can't even run. So yeah, when you're talking about the runtime or performance, Typescript === Javascript. By this kind of logic, C++ === machine code. It compiles down to it, right?
- nameiscubanpete 8y agoIt's really kinda both, but context sensitive.
- golergka 8y agoIt's the other way around - if A is a superset of B, it's correct to call B as A, but not to call A as B.