5 ms·
I was initially kind of worried about TS. It has kind of a high barrier to entry with linter settings, typescript-specific setting, solving how to compile your
by BossingAround 6y ago
I was initially kind of worried about TS. It has kind of a high barrier to entry with linter settings, typescript-specific setting, solving how to compile your code easily, learning the new syntax, etc. etc.
I literally spent like an hour reading up on it and learning it, and I realized I never want to go back to a plain old JS. TS feels way closer to Java than to JavaScript, with its own quirks and way of functioning of course. The barrier of entry seems perceived, but not really that big of a deal.
I wonder what are the cons of TS.
- arvinsim 6y agoThe number one pain point for me is that sometimes time is wasted tracking TS error or bugs than actually solving my problem.
- nsonha 6y agoTo me I sometimes get too obsesded with types and try to wrire clever ergonomic type inference. Usally I stop when I realize the types are double loc comparing to the actual implementation or what I was trying to do was impossible. It can be a drain on productivity if you're like me.
- BossingAround 6y agoComing from Java background, I personally have no such problem. Is JS your only/main language? Maybe JS + Python?
- nsonha 6y agoNot really I played around with multiple things. Came from a Java background too. I'm in the process of trying to get to a better language actually, like scala or F#. Java seems too limited and typescript while can do a lot of things is no scala and not as clean as F#.
- reificator 6y ago> TS feels way closer to Java than to JavaScript You and I clearly have different understandings of Java, JS, and/or TS. Typescript's structural typing feels like the opposite end of the spectrum from Java's nominal types.
- BossingAround 6y ago> Typescript's structural typing feels like the opposite end of the spectrum from Java's nominal types. Be that as it may, I said nothing about type systems. I said that TS feels closer to Java than it does to JS. Seeing as JS has no type system, I fail to see your argument.
- reificator 6y ago> Be that as it may, I said nothing about type systems. Typescript is nothing more and nothing less than a language that adds static typing to Javascript. Any discussion about how Typescript changes the feel of Javascript is a discussion about type systems. > Seeing as JS has no type system, I fail to see your argument. Javascript absolutely has a type system. It's not static, and there are lots and lots and lots and frankly too many ways to automatically coerce types, but it definitely has a type system.
- worik 6y ago"I wonder what are the cons of "TS. I would like to know too. Sounds too good to be true....
- acemarke 6y agoLike any tool, TS has tradeoffs. I wrote an extended blog post about my own experience learning and using TS, and I listed a set of takeaways and lessons learned at the end: https://blog.isquaredsoftware.com/2019/11/blogged-answers-learning-and-using-typescript/ https://blog.isquaredsoftware.com/2019/11/blogged-answers-le... I also have a shorter summary of some of the pros and cons of using TS in my "JS for Java Devs" slides, here: https://blog.isquaredsoftware.com/2019/05/presentation-js-for-java-devs/ https://blog.isquaredsoftware.com/2019/05/presentation-js-fo...