that sounds terrible.
Ask HN: Is TypeScript worth it?
171–180 of 469 posts
Re: Ask HN: Is TypeScript worth it?
#172I feel like TypeScript is definitely worth it BUT it seems to be getting ever more powerful but not in a good way, in complex way. Too much time is spend fighting TypeScript as opposed to writing application code. I have a question for the language experts out there .... why is TypeScript getting so complex? Are other strongly typed languages this complex? Or does the complexity arise from trying to overlay typing on…
Re: Ask HN: Is TypeScript worth it?
#173There are a lot of cases where it's totally reasonable/rational and honestly fairly safe to just throw in a well-scoped "any" cast, a `// @ts-expect-error` comment, etc.
If you know what you're trying to do, and TS isn't understanding, sometimes it's just a lot more expedient to tell it to shut up and listen to you.
Of course, sometimes you're wrong, and you don't want unsafety to leak, so it does require a fair amount of experience and judgement to do responsibly.
Re: Ask HN: Is TypeScript worth it?
#174One of the biggest mistakes that I see devs making is caring too much about making TypeScript happy when they know it doesn't really matter. There are a lot of cases where it's totally reasonable/rational and honestly fairly safe to just throw in a well-scoped "any" cast, a `// @ts-expect-error` comment, etc. If you know what you're trying to do, and TS isn't understanding, sometimes it's just a lot more expedient to…
Re: Ask HN: Is TypeScript worth it?
#175We have been using typescript in large scale JS project with 15-20 library modules and 7-8 product modules. I cannot think of building such product without typescript. When we compile all libraries and products and see no TS errors, we know at least that we are referring to correct properties, and wiring the shape correctly. Typescript has bunch of "clever" things but you don't have to use it. We probably use 30-40%…
Exactly. Some people seem to have the idea that you have to spend weeks writing esoteric type definitions before TS will work for you, which is just not true. You can get a large portion of the benefits with very little additional work, often just adding types for function arguments. (In many cases those types can replace comments that were trying to convey that same information, with the advantage that they won't get out of sync with the code). And for code that intentionally takes advantage of dynamic typing, it's perfectly fine to slap "any" on it rather than trying to come up with a bunch of clever types.
Re: Ask HN: Is TypeScript worth it?
#176I've seen the codebases created and maintained by people who "don't need types because it just slows me down." Hard pass.
This is going to sounds super hash and will probably ruin a lot of folks days, so I'm sorry, but...I love how these snooty elitist overgeneralized denunciations of "those typeless savages" pass for reasoned argument and justification within the hoards of the type zealots. When I think in reality, it's just people who were forced to use TypeScript because their workplaces gave them "no choice" (always a choice folks),…
Re: Ask HN: Is TypeScript worth it?
#177I feel like TypeScript is definitely worth it BUT it seems to be getting ever more powerful but not in a good way, in complex way. Too much time is spend fighting TypeScript as opposed to writing application code. I have a question for the language experts out there .... why is TypeScript getting so complex? Are other strongly typed languages this complex? Or does the complexity arise from trying to overlay typing on…
I don’t know but my experience with TypeScript is it is the C++ of type systems- it wants to have all possible features and caters to the demands of the most sophisticated users at the expense of the 99%. I also enjoy using simple TS like I like to write simple C++.
The Wizards Of TypeScript seem to be implementing ever more obscure use cases with ever more diminishing returns in terms of the number of programmers who will ever use those advanced features.
What happens when you have a fully funded development team at Microsoft, who actually finished the job long ago? They just keep developing, ad infinitum.
Re: Ask HN: Is TypeScript worth it?
#178> Is Typescript worth it? > I want to skip over the static typing benefits argument… Typescript, as the name implies, adds types to your script. If you don’t see the benefits of types then typescript may not be for you. > My issue is with the amount of extra work it places on developers… and doesn't deliver all that much value. If you think adding types doesn't add much value then typescript may not be for you. In my…
You have misunderstood the OP. The full paragraph is:
>> I want to skip over the static typing benefits argument, because I think it is well understood that static typing is a good thing and if we could bless JavaScript with a built-in and robust typing system then I don't think many people would be against that. My issue is with the amount of extra work it places on developers, much of it the "dumb" kind of work which can eat up hours and doesn't deliver all that much value.
Summarized: "I agree that static typing is a good thing. My issue is with the extra work (required to use TypeScript)...which doesn't deliver much value".
That is - they are saying that types deliver value, but that the extra busywork required to use and maintain a TypeScript project (e.g. keeping dependencies up-to-date) does not - and, by implication, that the overhead of this maintenance work is enough to make them question whether the (acknowledged) value of types is worth it.
(Note that I do not have a horse in the race as to whether the OP is correct in thinking that the overhead of TypeScript _as a language_ is greater than the value of the types. I haven't used it enough to have an educated opinion. But I am certain that you are responding to a point that was not actually the one being made)
Re: Ask HN: Is TypeScript worth it?
#179Re: Ask HN: Is TypeScript worth it?
#180> Is Typescript worth it? > I want to skip over the static typing benefits argument… Typescript, as the name implies, adds types to your script. If you don’t see the benefits of types then typescript may not be for you. > My issue is with the amount of extra work it places on developers… and doesn't deliver all that much value. If you think adding types doesn't add much value then typescript may not be for you. In my…
> If you don’t see the benefits of types then typescript may not be for you. At this point in my 20+ year career working with mostly dynamic languages, my feeling is that if you don't see the benefits of types, then programming isn't for you.