Short answer: It is worth it if you want me on the team. I refuse to work with anyone who throws out TS for JS in 2023. Slightly longer answer: I have said a number of times "Javascript is a simple version of Java in the same way as a bike with one wheel is a simpler version of an ordinary bike." The same can be said about JS and TS. If you want to do any serious work you go for the serious thing even if it means occ…
I don’t want to sound harsh, but saying Javascript is a simpler version of Java just tells me you have never used Java seriously. It’s like saying Korean is a simpler version of Spanish. Yes, Java and Javascript are both programming languages, but they don’t even share the same paradigm. You might be confusing the motivation that led to the creation of Javascript with the actual implementation. Having said that, I ha…
Ask HN: Is TypeScript worth it?
351–360 of 469 posts
Re: Ask HN: Is TypeScript worth it?
#352- chaotic and baroque layers of tooling that need to be figured out and made to keep working
- a software tradition where poorly thought out ideas are implemented with vigor resulting in design by accident
- ...which then results in frequent rewrites
- a universe of low quality libraries and frameworks resulting in frequent discovery of serious bugs
- every project having lots and lots of dependencies
And that's before we even consider the language or the congenital defects inherited from JavaScript.
Re: Ask HN: Is TypeScript worth it?
#3531) Look up "this months current way of doing things"
2) have a couple of horrible hours wrestling with tooling and the module system
3) add a new feature, install 1 lib with 30 deps
4) figure out that one dep does not work with TS/the chosen module system/whatever versioning related thing
5) go for a walk. scream into the void. come back to the desk.
6) browse through dozens of Github issues to figure out what is going on
7) decide to fork the according dep knowing that I'll hate myself in 3 months
8) ...
Yeah, so I'm kind of missing the good old YOLO JS times w/o semi-colons and stuff. But I need to say that I'm usually not opting for NodeJS for deep "OOP-alike" Domains. I think NodeJS' sweet spot is infrastructural things, MQ Consumers, glue code or little http fetching/posting orchestration scripts. I never had too many issues without static typing because I intentionally kept things simple, had tests and rolled out updates consciously watching the ongoings.
Re: Ask HN: Is TypeScript worth it?
#354Earlier quoted context omitted.
whoever said that javascript was a simple version of java? the two languages have almost nothing in common - at least a unicycle and a bicycle share the concepts of "wheel" and "pedals".
Java has wheels and pedals. Javascript only has objects that say they are wheels, and objects that say they are pedals, but which are really both and neither at the same time.
Re: Ask HN: Is TypeScript worth it?
#355JS is a garbage language. You need only look at identity or all the stupid asymmetries in the language to realize it isn't a well designed language. TS tries to fix that, and good job for doing that, but you can't escape the fact that it is desperately trying to fix a pig with lipstick, botox and hold-in pantyhose.
Re: Ask HN: Is TypeScript worth it?
#356Re: Ask HN: Is TypeScript worth it?
#357Earlier quoted context omitted.
These estimations are pure imagination. I doubt you have `any` real data to support it. Also, that is not the reason why Typescript was created, nor the reason why people adopt it, not even what Typescript really is. Today, almost every Node.js framework supports Typescript out of the box. I challenge you to provide a modern framework that doesn't provide types. And this is not an opinion, nor it is wishful thinking,…
> These estimations are pure imagination There are decades of literature on the matter. You simply have to look for it. Statically typed languages are known to lead to slower initial development times, because languages are inherently more complex and there are more concepts to grasp. usually thy also need to be compiled, which makes times even longer and setups harder. Good news is that long term they tend to be ass…
I hear people saying that, but I'm not sure I buy it. Is there any research that supports that, and if so, for which languages? Also, what does "initial development" mean here? The first day, week, month, year? And unless your project is trivial, isn't it somewhat important that as much of the initial work as possible provides a solid foundation for the future of the project so it wouldn't pay off skimping on this?
Re: Ask HN: Is TypeScript worth it?
#358Earlier quoted context omitted.
These estimations are pure imagination. I doubt you have `any` real data to support it. Also, that is not the reason why Typescript was created, nor the reason why people adopt it, not even what Typescript really is. Today, almost every Node.js framework supports Typescript out of the box. I challenge you to provide a modern framework that doesn't provide types. And this is not an opinion, nor it is wishful thinking,…
Strongly typed languages already did take over the software development paradigm. It happened when Java, C++ and C were the dominant languages. Then it regressed back to dynamically typed languages as ruby, php, python and js skyrocketed into popularity. With the advent of typescript and other things like it... types are now back in vogue but for how long? The universe is a four dimensional loop. Programming, like hi…
C is not a strongly typed language. Did you mean statically typed?
Re: Ask HN: Is TypeScript worth it?
#359What’s the alternative? If you make a type error in TS you get a cryptic error[0], but if you make a type error in JS you get a bug which you learn about after it crashes prod…
[0] Personally I rarely get cryptic errors, because I go out of my way to design libraries in a way that the type definitions are kept simple, which also has the benefit of keeping the mental model of how the library works simple ;)
Re: Ask HN: Is TypeScript worth it?
#360I don't like JavaScript, I don't like TypeScript, I don't like front end development at all. Is typescript worth it in my personal projects where I know all the code and they are pretty small? In my opinion, no. Is typescript worth it at work, where multiple people interact in a large codebase? Absolutely. Asking if a language is worth it is pointless unless you add "to my use case"
Can't believe how long I had to scroll to find the answer I agree with, effectively: "it depends". Going with car analogies, the question is similar to "Is a bus better than a race car?" - there's no correct answer without more context. How many people use one or the other, how many people praise one or the other, that's no help either. That said, regardless of whether it makes me happy or whether it's a solid techni…
I agree that you must learn it at least a bit for web development. I occasionally have to fix some bug and so I learned it. Another month of income earned.