Just Say No to JavaScript
infoworld.com
Just Say No to JavaScript
1–10 of 86 posts
Re: Just Say No to JavaScript
#2Re: Just Say No to JavaScript
#3Re: Just Say No to JavaScript
#4If lack of explicit typing is the issue, then his rant would apply to most scripting languages and to single out JS seems odd to me...
Re: Just Say No to JavaScript
#5This is a plea to use TypeScript instead of JS. Why not. Strong typing is certainly great. But the reason I don't use TypeScript isn't any of those listed: it's because it needs a compilation step, and I don't want that.
Why? The seconds it takes to compile even a large project are paid back a million fold everytime it catches a mistake you'd have missed or your IDE out you used the wrong type.
It's probably not listed in the article because it's a nonsensical argument.
Re: Just Say No to JavaScript
#6> Ultimately, JavaScript was the right thing at the right time. It ended up being folded, spindled, and mutilated to serve purposes that it isn’t well suited for
Counterpoint: many quirks in the language were addressed, e.g. introduction of === and with ESLint you get many of the practical advantages of a type checker. And when you need more safety, sprinkle TypeScript on top.
What I really want for Christmas is a TypeScript-to-native compiler.
Re: Just Say No to JavaScript
#7The author seems to ignore the fact that type hints are a thing even with plain JS. Serious question: does the author "just say no to Python" as well? If lack of explicit typing is the issue, then his rant would apply to most scripting languages and to single out JS seems odd to me...
Can you clarify how you do this? the type annotation TC39 is not approved; but I'm interested in hearing if you have a "userland" approach that works for you?
Re: Just Say No to JavaScript
#8But for Web UIs I'll drop down to a #NoBuild "Simple, Modern JavaScript" [1] i.e. using JS Modules + JSDoc Type Annotations to avoid needing any npm modules/build steps/etc. I still benefit from a library's TypeScript definitions/VS Code intelli-sense/static analysis/etc but completely avoid any build/bundling complexity for the cost of a slightly more verbose syntax in JSDoc type hints.
I'd happily move to using ECMA Type Annotations proposal [2] if it ever got accepted, but alas TC39 moves slowly...
Re: Just Say No to JavaScript
#9I don't have a problem using typescript, but prefer dart if you need a strongly typed (null safe) language.
Re: Just Say No to JavaScript
#10This is a plea to use TypeScript instead of JS. Why not. Strong typing is certainly great. But the reason I don't use TypeScript isn't any of those listed: it's because it needs a compilation step, and I don't want that.
I personally switched to Bun, and could not be happier. My build toolchain is quite simple now. I run the Typescript compiler to just type check my code, and use Bun to actually run it. For bundling, I use esbuild.