Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I never understood why people feel that typescript has a learning curve. I never formally learned typescript; I just started using it intuitively. I already knew javascript, and I already understood how types work from using other languages, so there wasn't anything to learn.

When people say typescript is hard to learn, do they know javascript, or are they starting from scratch?



I had a similar experience where I was able to pick up most of it just by tinkering around with it, but there were a few places where I expected it to behave in a certain way, but ended up tripping over a few places where the type system is a little too weak, or the syntax for some of the advanced types are too unique to guess how it works without some studying. I made a blanket statement about the curve too, since I feel like the community as a whole is still adopting it. Library authors adopted it early, but the average front-end dev (judging from podcast topics and documentation I see) seems to be really getting serious about learning it in depth. YMMV.


It has an insanely complex type system. It's kind of incredible, I don't know of any other type systems off hand which are totally turing-complete. That's honestly really impressive.

I don't think you need to use most of these types until you start getting into stuff like needing union types. You can get away with reading and writing most typescript without getting too crazy.

I think the most compelling thing I read about type hinting is that it's like salt - A little and the dish doesn't taste the same without it but too much and you've ruined the thing


OCaml, Haskell and C++ (with templates) for example.


Same.

Python's type hints and Ruby's Sorbet (or their weird RBS thing), I can understand.

But TypeScript? Besides a few things that are not obvious at first (like callable interfaces), I don't think you really need to think about most stuff.




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

Search: