4 ms·
Well, neither are comparable to typescript/js, so I'm not sure what your point is. Both add heavy language features and runtimes that are completely absent from
by drb91 8y ago
Well, neither are comparable to typescript/js, so I'm not sure what your point is. Both add heavy language features and runtimes that are completely absent from Typescript's additions. Typescript truly is javascript with type annotations and validations.
I think a better example would be Typed Racket.
- Const-me 8y ago> Both add heavy language features and runtimes C++ did none of that. Unlike ObjC, there was no heavy runtime in initial versions. It was physically impossible, because it compiled into C. Even in modern versions, C++ runtime is very small unless you use corresponding standard library features. Similar for language features. Before templates, C++ only added a few keywords to the language. In the same manner TS adds strong typing, interfaces, generics and modules.
- drb91 8y agoYea sure, I suppose you could compare typescript to C++ from 1983. That's certainly not the original comparison (or one anyone would assume), though.
- Const-me 8y agoI would say it’s more like C++/98, e.g. generics are already here (roughly equivalent to C++ templates).
- drb91 8y agoThe runtime behavior I was alluding to with C++ would be exceptions, which dramatically changed the language compared to c—I'd peg the demise of C++-as-a-superset-of-C with the death of cfront in 93: https://en.wikipedia.org/wiki/Cfront https://en.wikipedia.org/wiki/Cfront