I think, based on many battles, a lot of folks in the early days that came from Java/C++ absolutely struggled with the key concepts of JavaScript, couldn’t find “features” (like strong typing) they claimed were critical for writing good software and invented ways to make the language fit their paradigm, rather than really deep dive into the language and embrace it. There were constant battles back then - and I’m sure the battles continue.JS was certainly never a “garbage” language but the elegance is unappealing/unappreciated by entire classes of developers. I totally get the perspective, but it’s all based on a worldview that just doesn’t get functional programming
fenomas|1 year ago
(In face, the Java/C++/OO-types I know strongly dislike TS because it's structurally typed. TS doesn't care a jot who extends what - as long as they have the same properties it's happy. Hard to get more un-java than that.)
The real reason that TS won is simply that large teams (e.g. hundreds) cannot effectively work together on untyped JS. If you're doing a solo project, fill your boots - use JSDoc comments, sprinkle asserts around, whatever. But the webdev world at large doesn't care about Java or OO concepts, it settled on TS because huge teams can work effectively with it.
h335ian|1 year ago
dleeftink|1 year ago
An elegant typed one would be Structurae [0].
I imagine/would love to see a bunch of elegant non-typed ones as well.
[0]: https://github.com/zandaqo/structurae
danmur|1 year ago
h335ian|1 year ago
I’d strongly encourage doing a deeper dive here. Functions in JS are objects and can have their own methods/props + scope. They’re a first class citizen.
devbent|1 year ago
How about reasonable scoping rules?
Pre-es6 JavaScript was a nightmare of ugly hacks needed to make the language usable. that = this and {...}() All over the place.
nsonha|1 year ago