The problem is, typescript will still silently infer 'any' type in certain cases even with all the no-implicit-any compiler flags enabled, and you'll never know when this happens until you have a bug.
Not to mention that its type system is unsound by design, and not because of null. Typescript only pretends to be safe, so in practice you end up writing a lot of type annotations for very dubious gain.
Stricter options like Facebook Flow or Scala.js are way more useful.
> Not to mention that its type system is unsound by design, and not because of null. Typescript only pretends to be safe, so in practice you end up writing a lot of type annotations for very dubious gain.
Stricter options like Facebook Flow or Scala.js are way more useful.
Curious, can you explain why Flow is a more "sound" type system than Typescript?
Re:Angular 2 is terrible
by throwwatgku on Thursday December 01, 2016 @10:00PM
(#13085628)
+1
typescript is to js as c++ is to c. Not a perfect abstraction and still with some problems, but realistically as good as were going to get any time soon.
It's even implemented the same way, a massive preprocessor built to take away most of the pain from something so ubiquitous that it's unfixable.
Re:Angular 2 is terrible
by thecolorblue on Friday December 02, 2016 @09:37AM
(#13088807)
It seems like it would be easier to write in a language that does have the safety needed and then compiling to javascript. scala.js comes to mind.
TypeScript has compiler flags to give compiler errors when null errors are possible. You can also turn off the implicit "any" type and use linters to stop explicit use of it.
It's a pretty good compromise given it has to work with what's out there already and it's certainly an order of magnitude safer than plain JavaScript.