Re:State of JavaScript 2019
by smt88 on Thursday December 19, 2019 @03:46AM
(#21833138)
I'm not sure it's worth addressing this rant because it conflates so many things, but...
> "Oh, look, typescript! Finally JS looks like Java!"
TypeScript's structural typing is vastly different from Java. With Java, every type must be declared somewhere. TypeScript types can be declared, defined as classes, or just based on whatever you typed.
At its core, the TS compiler is just paying attention to what you do and making sure you don't forget what you did elsewhere. It's like having bumper lanes on a bowling alley.
It's arrogant to think you'd get no use out of it when Microsoft, Facebook, and Google have all decided they need static typing on the back and front ends. If you think the cost is too high, that's a different argument, but I'd wager it's because of a poor IDE setup.
> Which means that silly HTML and CSS is going to be easy!
What does this have to do with TypeScript?
> Buzz off back to the backend, you strong-typed clown who doesn't understand what UX and a11y mean.
This is bizarre gatekeeping. TypeScript was adopted by Angular and, early on, seemed focused on browsers rather than Node.
> I know most people love it. I fucking hate it. I'm using it, because I have to, but I never needed it. It literally offers me nothing of value.
That's fine. You may believe it offers no value to you (although better auto-complete and errors are objectively valuable), but it does offer value to anyone who works on your code. TypeScript is like machine-readable self-documenting code.
If you document your code, it might as well be in a format the compiler can enforce and your coworkers can use without having to look back and forth between files.
> "Oh, look, typescript! Finally JS looks like Java!"
TypeScript's structural typing is vastly different from Java. With Java, every type must be declared somewhere. TypeScript types can be declared, defined as classes, or just based on whatever you typed.
At its core, the TS compiler is just paying attention to what you do and making sure you don't forget what you did elsewhere. It's like having bumper lanes on a bowling alley.
It's arrogant to think you'd get no use out of it when Microsoft, Facebook, and Google have all decided they need static typing on the back and front ends. If you think the cost is too high, that's a different argument, but I'd wager it's because of a poor IDE setup.
> Which means that silly HTML and CSS is going to be easy!
What does this have to do with TypeScript?
> Buzz off back to the backend, you strong-typed clown who doesn't understand what UX and a11y mean.
This is bizarre gatekeeping. TypeScript was adopted by Angular and, early on, seemed focused on browsers rather than Node.
> I know most people love it. I fucking hate it. I'm using it, because I have to, but I never needed it. It literally offers me nothing of value.
That's fine. You may believe it offers no value to you (although better auto-complete and errors are objectively valuable), but it does offer value to anyone who works on your code. TypeScript is like machine-readable self-documenting code.
If you document your code, it might as well be in a format the compiler can enforce and your coworkers can use without having to look back and forth between files.