For me, I can handle the lack of static typing when I'm doing small scripts, like if it's going to be 100 lines or so of Python (my go-to language if I need to test some math out in a sandbox or do some file manipulation on my system). I might actually be a little faster in writing those scripts because of the lack of typing. Once it starts getting any bigger than that, though, static typing really catches and points…
Naming is incredibly hard, though. And refactoring is hard. It's a pain in the neck when something starts out as bla_list or whatever and you discover that after half a decade of changes bla_list isn't actually a list anymore, it's a dictionary, and that it doesn't only hold Bla these days, it can also contain Foo or Bar. This type of stuff is immediately obvious with modern static typing.
How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
61–70 of 400 posts
Re: How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
#62Earlier quoted context omitted.
Agreed, though at least there's one less developer writing about the "TypeScript Tax".
I am a TypeScript fan but I do acknowledge the existence of the tax. TS is another cog in the machine that does useful work but can sometimes confusingly interact with other cogs (e.g. miles long unreadable TS errors coming out of React). Using or not using TS is not a trivial decision to me and should be made with consideration to the complexity of your stack.
Sorry for the off topic rant!
P.S: Yes I know source maps exist. They suck/aren't reliable.
Re: How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
#63Re: How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
#64For me, I can handle the lack of static typing when I'm doing small scripts, like if it's going to be 100 lines or so of Python (my go-to language if I need to test some math out in a sandbox or do some file manipulation on my system). I might actually be a little faster in writing those scripts because of the lack of typing. Once it starts getting any bigger than that, though, static typing really catches and points…
SQL is not typed, it is just text sent over a network or whatever and then parsed...
Re: How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
#65While I'm fan of statically typing, there is something with Typescript I don't like, but don't know exactly what it is. In my day-to-day it's mostly Kotlin and Elm, which also are both statically typed, which I don't mind and mostly don't even notice. But with Typescript it is as if I'm always fighting the compilator, trying to make it happy with whatever code I wrote. Maybe it's just the JS ecosystem being too lax t…
Re: How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
#66Earlier quoted context omitted.
Typescript is hardly "new", it's fairly widely accepted now. It might be worth thinking "why do all these people enjoy using Typescript?". or idk just say that no, its the kids that are wrong.
Typescript is not accepted. How AngularJS stuck on 1.* is the best proof, and an illustration for the problem. Pretty serious people are working in Angular community, it's immensely popular in the enterprise webapp space, so I will not take the "Ah, it's just amateurs who are stuck there." It adds to countless attempts of other transpiled *scripts to extend Javascript. They, and Coffeescript in particular, are good h…
Re: How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
#67It's probably worth taking a step back and interrogating why the actual "Why was I Anti-TypeScript?" a little bit more and use it as an opportunity for broader self development. The author didn't use and understand something, and rather than trying to they instead just defaulted to rejection. It's midly disapointing seeing this in people who label themselves as "Senior".
It’s like I’m a metal worker and I get along fine with a ball peen hammer. You come along and give me your claw hammer with great excitement. Sure, it can mostly do the same job, but my ball peen hammer is what I’m used to so I’m sticking with it.
Re: How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
#68Don't want to oversimplify since the article has some useful insights, but overall it reads like a typical transition from thinking static typing is a burden to realizing type safety can be incredibly useful. I distinctly remember that in college I believed the history of programming languages is purely evolutionary in the sense that newer languages are objectively better than older ones. As in - people wrote assembl…
I got this impression too, I was just like the Author in that I hated static type checking as a Junior, but as I gained more experience it flipped from "I hate this" to "this is the first thing I implement in a new project".
To your point of thinking that newer languages being "better" than older ones. I think that also comes down to experience. At first I thought the same way, but the most experience I gained the more I realized that each language is a specialized tool for using in specific cases, some tools are very very specialized (WASM for example) while others are broad (like Javascript).
Re: How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
#69"I always used to get some compilation errors which were hard to understand initially, and I scratched my head trying to figure out the problem. "
Which is like saying, "I got rid of my carbon monoxide detector because it kept beeping at me"
Re: How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
#70Earlier quoted context omitted.
Naming is incredibly hard, though. And refactoring is hard. It's a pain in the neck when something starts out as bla_list or whatever and you discover that after half a decade of changes bla_list isn't actually a list anymore, it's a dictionary, and that it doesn't only hold Bla these days, it can also contain Foo or Bar. This type of stuff is immediately obvious with modern static typing.
This feels more like developers learning that any variation on Hungarian notation is a bad idea.