News for hackers. Stuff that matters.
Re:The Frontend Treadmill by ForTheKidz on Thursday March 20, 2025 @09:00AM (#43422554)
Javascript doesn't have a good enough standard library to execute on this. You need frameworks just to patch up the runtime (or otherwise avoid the holes). Last time I checked they didn't even have decent hashmap or set implementations (let alone decent serde support).
Re:The Frontend Treadmill by wbobeirne on Thursday March 20, 2025 @09:08AM (#43422697)
This was true in the lodash and jquery as essential days, but hasn't been the case for years.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:The Frontend Treadmill by romellem on Thursday March 20, 2025 @10:50AM (#43424252)
> hasn't been the case for years

For 10 years, actually. ES6 - otherwise known as ECMAScript 2015 - did in fact come out 10 years ago.

- https://en.wikipedia.org/wiki/ECMAScript_version_history#6th...

It truly did improve the JS landscape by an order of magnitude.

For those unfamiliar with the extensive features this brought to JS, here is a good list:

- https://rse.github.io/es6-features/

Re:The Frontend Treadmill by everybodyknows on Thursday March 20, 2025 @02:24PM (#43427001)
ES6 modules make it straightforward to reform great piles of unstructured JS hackery into hierarchical dependency-controlled units for which you can actually reliably draw a block diagram. Hmm, or maybe get Claude to draw it for you ...
Re:The Frontend Treadmill by ForTheKidz on Thursday March 20, 2025 @09:11AM (#43422739)
Ah, I stand corrected. I have more recent examples but I struggle to recall them. Map and Set were certainly the two largest absences I remember.
Re:The Frontend Treadmill by stank345 on Thursday March 20, 2025 @09:35AM (#43423132)
Yeah, those were two big sticking points.

There's also Object.groupBy() now which was another thing I always missed from the standard library.

Proposals tend to get adopted at a snail's place but it's neat to see what's coming down the pike: https://github.com/tc39/proposals

Re:The Frontend Treadmill by runako on Thursday March 20, 2025 @09:38AM (#43423189)
Worth noting that those features were indeed added after the creation of e.g. React, but both have been widely available for ~10 years now.
Re:The Frontend Treadmill by onli on Thursday March 20, 2025 @09:10AM (#43422721)
No regular frontend needs any of that. Serde support, that's a ridiculous requirement for painting some web boxes on a display.

Plus, as the other comment noted, the basic JS types go a long way now.

Re:The Frontend Treadmill by ForTheKidz on Thursday March 20, 2025 @09:17AM (#43422836)
You don't need javascript at all to render.

Oh for a version of the WWW that never allowed javascript at all.... money destroys absolutely everything it touches.

Re:The Frontend Treadmill by metalforever on Thursday March 20, 2025 @02:25PM (#43427019)
Alright, I've been in the industry a very long time but moved to backend when it got complex. I am wondering why you need a decent hash map or set implementation. This is supposed to be done on the backend. The frontend is for presentation. Your backend should not give you elements with duplicates (why you don't need set). "Decent hash map" sounds like you just don't like the hash map implementation because you are trying to do something complex with the Map implementation, in which case it belongs on the backend.