3 ms·
> but its usually some typescript challenge or something like that - which i refused to learn, since i already know javascript. once static type checking became
by clouddrover 4y ago
> but its usually some typescript challenge or something like that - which i refused to learn, since i already know javascript. once static type checking became a requirement in front end is like the intersection for when i became a dinosaur
Why? Static type checking is a good thing to reduce errors.
- sli 4y agoTypeScript is a Microsoft band-aid on problems far better solved by other languages. The level to which people praise it feels like Stockholm Syndrome, and criticizing it frequently gets the stereotypical toxic programmer forum replies like "well you just don't know how to use types." It's impossible to speak critically about TypeScript unless you write long blog posts.
- cutler 4y agoStatic typing zealots have butchered perfectly good dynamic languages like Python and Ruby in recent years after M$ took over Javascript like Russians invading Ukraine. Even Ruby ffsake. Soon Clojure will be the only refuge for us devs who value dynamic languages.
- sanitycheck 4y agoIt totally is, but it does largely work as intended. For people who've been dealing with JS for years it's a big improvement which I guess is why it gets so much praise. (The love for React, OTOH, must be Stockholm Syndrome!) Other languages are better, but transpiling from them to JS has (arguably?) bigger downsides than using TS. WASM is the big hope for some people, of course, but it's only really good for heavy lifting at the moment.
- clouddrover 4y ago> It's impossible to speak critically about TypeScript unless you write long blog posts. If it takes a long blog post to find something to criticize about TypeScript then I'd say that's a sign that TypeScript is doing something right.
- wruza 4y agoAlso good to increase time to market and make you think more about types, less about business logic. It has both pros and cons depending on what you are doing. I have learned and can read and write typescript, but it doesn’t click when it comes to “we’ll need it tomorrow to check our ideas fast”, the usual mode of startup operation. These stories about night and day difference also do not match my reality. All my code paths are either hot or tested. How many type-related bugs have I encountered last year? Maybe a few, but can’t remember even a single one. Maybe I’ll gradually type it after we go into maintenance mode, maybe leave it as an exercise to a maintainer if they see fit. My last few projects were successful and brought solid revenue without any type-related issues.
- clouddrover 4y ago> Also good to increase time to market and make you think more about types, less about business logic. Show me some actual measurements that TypeScript increases time to market. I don't believe you have any.
- sanitycheck 4y agoI've seen it add days of pull request code golfing whenever someone makes some new types, but those people would find other ways to waste time on pure JS projects.
- CapsAdmin 4y agoI can't speak for the OP, but I've met people who "don't get it" for various reasons (me included at some point). I'm pretty sure the OP has heard this argument before. Telling someone to use language A because it's much better than language B that the person is comfortable with is not a very good approach. You can get into the objective reasons as to why but for some it might be difficult to really understand. I struggled with this when I was introduced to types as the entire concept was completely new to me. I had other ways I could think of to reduce errors (tests, more robust code, etc) and I wasn't sure how typescript could help me reduce errors any further or if it was worth learning a new (seemingly difficult) concept to deal with something I already felt I could deal with.
- clouddrover 4y ago> I had other ways I could think of to reduce errors (tests, more robust code, etc) You can still do that with TypeScript and also get type checks, null checks, and just typos found for you by the compiler. Why wouldn't you want the compiler to do that for you? I don't want to do it, I want the tools to do it.