News for hackers. Stuff that matters.
Re:JavaScript libraries should be written in TypeScript by echelon on Wednesday March 16, 2016 @11:38AM (#11298147)
It's so much more pleasant to write and maintain than wild, un(type)safe javascript.
Re:JavaScript libraries should be written in TypeScript by acjohnson55 on Wednesday March 16, 2016 @04:16PM (#11300350)
Only problem is that it's not sound. That means that while it may provide static checking that your program is validly linked together, it can't fully prevent run-time type errors. And kind of like you can't be "a little pregnant", you can't be "a little typesafe".
Re:JavaScript libraries should be written in TypeScript by JoeAltmaier on Wednesday March 16, 2016 @04:20PM (#11300367)
Of course you can. Can't catch all the bugs; but can catch some of them. Which saves time and money. It doesn't actually have to be perfect to be useful and helpful.
Re:JavaScript libraries should be written in TypeScript by acjohnson55 on Thursday March 17, 2016 @06:42PM (#11308228)
I'm not saying it doesn't help. I'm saying you can't count on it the same way you can if you're working in a truly end-to-end statically typed environment. Even Scala's type system has its leaks, due to nulls.