Hacker News new | past | comments | ask | show | jobs | submit login

That's pretty nice, but it's also a large amount type system machinery for what is in Python an idiot-simple API. Imagine you have:

    array[0] + 2
And you change it to:

    array[random() % 3] + 2
Now you get a type error on "+". Think about the level of type system sophistication you need to have as a user to understand why that change caused that error.

In some senses this is even worse than programming in either a dynamically typed language or a statically typed one. You still get the performance and unsoundness of a dynamically typed language. But you also get the type errors and cognitive load of a typed language, with a type system that is much more complex than a typical typed language.




The better feedback loop actually makes it worth it. Yes, we don't get soundness and performance when programming in TypeScript, but we do get better feedback in the editor along with great escape hatches for customizing types as needed. I don't know if I ever can go back to a sound statically typed language again, actually, TypeScript is just way too useful.


I feel exactly the same way. I thought I liked static typing more than dynamic typing until I tried TypeScript, but TypeScript feels like by far the best of both worlds.

I especially feel like null checking is impossible to live without, and I'm going to strongly prefer TypeScript over Go or Dart from munificent's list until they add null checking.


We're working on static null checking in Dart now. Unlike TypeScript's, Dart's approach to null checking will be sound.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: