I'm still using CommonJS and occasionally ESM, but I always get to integrate JSDoc for weak typing in IntelliSense. It's like getting the (almost) juiciest part from Typescript without committing to it
this post was submitted on 08 Sep 2023
526 points (94.0% liked)
Programmer Humor
19623 readers
1 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
When I write JS:
- It's because it has to run in a browser. (Why would I want to write JS that runs outside a browser? Rhetorical question. Don't answer that.)
- I use no JS dependencies. Zero. None. No jQuery. No React. No VUE. No Typescript. Nothing like that. (Unless you count as "JS dependencies" a) a minifier (but not one written in JS) or b) browser builtins.)
- I don't use any ECMA6 stuff. (Who asked for classes anyway?) Though to be fair, that's definitely at least partially because I have yet to even really look into what's available.
- I love callbacks and closures.
- I keep my global scope tidy, though I do store some things in the global scope. (Typically one or fewer global variables defined per JS file.)
- I don't use prototypes. Just because I've never found good uses for them.
I do believe there's a beautiful language living inside JS. It is quite pleasant to work with. But not the kind of thing I'd want to write "real software" in when there are alternatives like Go or even Python.
load more comments
(5 replies)
Typescript is an abomination. Been writing JS just fine for 30 years without it.
load more comments
(3 replies)