Re:Ask HN: What made you change your mind about a programmin...
by spricket on Sunday March 03, 2019 @10:37PM
(#19298591)
I agree, because type inference in some (Typescript) is good enough that there's almost no overhead. Back when it took twice as many lines with types it made sense. But the overhead in typescript is maybe 10%, worth it anymore? I don't think so
[ Parent
| on HN ]
Re:Ask HN: What made you change your mind about a programmin...
by chuckdries on Sunday March 03, 2019 @11:18PM
(#19298741)
I think we have a ways to go. Typescript's type system is very feature complete (which is a good thing, but it also means there's a lot to learn, and I feel like I have to think about type definitions more than I ever did with other languages), but also, fantastic libraries like Ramda have a lot of trouble with expressing their types with Typescript. It's a tough problem to solve, and I still use both, but I'm just saying we're not there yet.
Re:Ask HN: What made you change your mind about a programmin...
by spricket on Sunday March 03, 2019 @11:40PM
(#19298823)
I agree that the type system is very complex. I've spent a lot of time wrapping my head around it and still get confused sometimes.
Unfortunately Typescript's type system is largely driven by the need to represent anything you can do in JS, for library compatibility reasons.
The main designer also wrote C# and Delphi. In a lot of ways, C#'s type system is better (less complex), but Typescript has the huge advantage of working with existing JS