As front-end developers, staying ahead of JavaScript’s evolution isn’t optional — it’s survival.
When the ES2025 proposals dropped, many developers (myself included) were shocked.
Isn't this hyperbole par excellence? There are some new language features, that is all. The whole article looks like written by this LLM prompt: "write about the new features of es2025 and hype it up as much as possible"People have got to start prompting their LLMs to stop with the goddamn emoji.
when ({ status: s if s >= 500 }) -> throw new Error(’Server Error’)
Is it only me or this doesn’t look like JavaScript anymore? function handleResponse(response) {
return match (response) {
when ({ status: 200, data }) -> data
when ({ status: 401 }) -> throw new Error(’Unauthorized’)
when ({ status: 404 }) -> throw new Error(’Not Found’)
when ({ status: s if s >= 500 }) -> throw new Error(’Server Error’)
default -> throw new Error(’Unknown Error’)
};
}
Is less readable to me than the way I would write it without the match/when construct: function handleResponse(response) {
status = response.status;
data = response.data;
if (status === 200 && data) return data;
if (status === 401) throw new Error(’Unauthorized’);
if (status === 404) throw new Error(’Not Found’);
if (status >= 500) throw new Error(’Server Error’);
throw new Error(’Unknown Error’);
}Here’s what actually is new: https://2ality.com/2025/06/ecmascript-2025.html
const result = data
|> Object.entries(%)
|> (%.filter(([k, v]) => v != null))
|> Object.fromEntries(%)
|> Object.values(%)
|> JSON.stringify(%)
|> encodeURIComponent(%);
Looks kinda awful to me. Am I strange that I prefer the 'spaghetti' version?Pattern matching is still Stage 1, meaning it’s not a standard: https://github.com/tc39/proposal-pattern-matching
Pipeline operator is Stage 2 and won’t use the “|>” syntax: https://github.com/tc39/proposal-pipeline-operator
EdwardDiego•2h ago
I'm going to press Circle to Doubt.
Oh look, every section header starts with an emoji. Gee, wonder who wrote this.
That said, it is nice that they finally borrowed the pipe-forward operator from the ML languages. Record and tuple syntax is gross though.