Live data from Hacker News

The JavaScript ecosystem is delightfully weird

fly.io

221–230 of 248 posts

Re: The JavaScript ecosystem is delightfully weird

#221

Earlier quoted context omitted.

Didn't python add static typing?

Only type hints. They help a linter/IDE bitch about types but they don't have any enforcement beyond that. They're great for self documenting methods but don't remove any dynamic typing from the language itself.

I'd argue that typescript is the same, just stricter by default if using TSC. Many people run type checking separately from building/running the code, just like in python.

Re: The JavaScript ecosystem is delightfully weird

#222
post #68
post #7

Coffeescript was well before "tree shaking" (the JS ecosystem's way of spelling "dead code removal") and code splitting, both being relatively new things in the bundler world ("tree shaking" being introduced with rollup if memory serves). Then came Acorn, which gave way to a whole slew of JS transformation bits. It also didn't help that Node was fixed at 0.12 for years and years, and we had the IO.js fork until Node…

> As a maintainer of several large JS packages, and being so dreadfully burnt out on JS, there are other words I'd use to describe the whole thing than "delightful". My first project that used JS was in 1996, so I've been along the ride every step of the way. Up until today where I am working with all of this on an Angular 15 enterprise project. I actually would describe it as delightful, compared to what it was like…

If other tools handling the details just works for you, thats pretty amazing (and kinda surprising). Last time I was working on JS tooling there was a smorgesboard of various choices and it looked like most are opinionated just enough to not work with each other.

Re: The JavaScript ecosystem is delightfully weird

#223
post #217
post #197

Earlier quoted context omitted.

Not a fan, for one reason in particular: they allow URL imports[0]. It's a massive uptime and security flaw in my opinion that was added because someone asked for it. It's been asked for on the Node repository as well where it's received mixed feedback (namely, negative feedback from several core contributors) due to it being, well... a dumb idea. I've never seen the need for Deno. Every library I've written that has…

They have ways to lock, bundle & version those in the faq you linked, so it doesn't seem to be a problem. I wonder if people have the same complaints about golang

Locking, bundling and versioning do not solve availability.

Re: The JavaScript ecosystem is delightfully weird

#224

Earlier quoted context omitted.

They weren’t criticizing OOP per se. Before the class keyword, JavaScript had much more powerful OOP semantics using metaobjects.

The class keyword is just syntactic sugar. JS still uses prototypal inheritance. Nothing has changed. Check out objectplayground.com for details.

Not ‘nothing’ has changed. Classes are supposed to be syntactic sugar over constructor functions, but the later could be invoked as well as instantiated with the ‘new’ keyword, whereas the interpreter will error out on you if you attempt to invoke a class. That is fine though, I don’t care for constructor functions. I was talking about using metaobjects, a different concept altogether.

Re: The JavaScript ecosystem is delightfully weird

#225
post #202

Earlier quoted context omitted.

Exactly what I thought a few months ago. The DOM and the HTTP api (or pretty much all browser APIs for that matter) should be interfaces that can be implemented in WASM code. I have no idea why this hasn’t been proposed let alone implemented. I mean, why give us the ability to use other languages if we can’t implement the (browser) APIs?

If having access to all browsers API had been a prerequisite to getting WASM on the browser, we’d still be decades away from having that, and we’d still be debating what the APIs should like in WASM. I’m grateful that people went for the pragmatic approach.

Sure but what I’m curious about is why? I looked it up after I made my original comment, and it has something to do with the fact that several DOM APIs are specific to JavaScript. I can see why that would be difficult, but not “decades” difficult.

Re: The JavaScript ecosystem is delightfully weird

#226
post #223
post #217

Earlier quoted context omitted.

They have ways to lock, bundle & version those in the faq you linked, so it doesn't seem to be a problem. I wonder if people have the same complaints about golang

Locking, bundling and versioning do not solve availability.

I'm not sure what you mean the versioning & bundling both ensure you have the right version in your local repository if desired. Of course the upstream source can go down but that isn't really different from any other package manager.

Re: The JavaScript ecosystem is delightfully weird

#227
post #7

Coffeescript was well before "tree shaking" (the JS ecosystem's way of spelling "dead code removal") and code splitting, both being relatively new things in the bundler world ("tree shaking" being introduced with rollup if memory serves). Then came Acorn, which gave way to a whole slew of JS transformation bits. It also didn't help that Node was fixed at 0.12 for years and years, and we had the IO.js fork until Node…

I wouldn't say bundling started with babel... but was predated by browserify and other bundlers... oh the days of gulp/grunt and browserify...

Re: The JavaScript ecosystem is delightfully weird

#228
post #186

Earlier quoted context omitted.

There are plenty of ways these days to build rich web applications without writing much JS. LiveView, Hotwire, Reactor, LiveWire, Blazor...

Not really against JS as a language, everything against the current state of its ecosystem

Not sure I fully follow where your response is aiming but if I understand correctly, I don't hate JS but I don't like using it for business logic. I feel these frameworks (I use LiveView) let me use JS what it's good for: a DSL for complex DOM manipulation. Everything else, including simple DOM mutations, is handled by LiveView and I can write business logic in a nicer language.

Re: The JavaScript ecosystem is delightfully weird

#229

I like javascript, but I always think about the time when I was working as a front end developer, and a guy across the room suddenly stood up, walked over to the white board, and wrote "F*CK JAVASCRIPT" in massive letters. I believe his concern was around the lack of type safety (this was before we used Typescript). And this was someone not prone to dramatic gestures. At the time I laughed. Guy must be having a bad d…

My experience with javascript as a non-software developer/non web person has often involved frustration. A good example is an experience I had a few years ago (circa 2018) My work acquired some new software which published some results using a REST endpoint. I wanted to pass some parameters to the endpoint get a response and display the response on a webpage. I'm used to working with Python/R and SQL databases it is…

You would find it even more difficult in almost every other language available.. What you're describing is simply the pain of learning a programming language with virtually no prior experience.

Maybe it's more simple in Python but this really isn't that complicated, it's certainly not a valid criticism of JS.

Re: The JavaScript ecosystem is delightfully weird

#230
post #44

I must be the only person left not writing TS at this point. Once EcmaScript adopts optional static types or some kind of standardized type annotations [1] I will probably use those. At least in Node, where I have more control of the runtime version. [1] https://github.com/tc39/proposal-type-annotations

You're not the only one. I'm sure Typescript is nice / better, but I don't feel like having yet another bullshit language foisted on me. Also I dislike Microsoft.

Typescript is just Javascript with more features. Why would you not embrace that? There's nothing taken away, only added.
Post reply on HN