RU version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
57% Positive
Analyzed from 1079 words in the discussion.
Trending Topics
#https#node#bun#release#upsert#map#temporal#com#nodejs#proposal

Discussion (49 Comments)Read Original on HackerNews
Their usage of upsert appears different than I was used to:
Me: Upsert = Update or Insert
Them: Upsert = Get or Insert
I agree that their choice of labeling the proposal as "upsert" is less than ideal. However, this functionality is reminiscent of a very useful Perl capability known as autovivification[0] as described in the motivation section:
0 - https://en.wikipedia.org/wiki/AutovivificationIf you use that operator and the value doesn't exist, it'll default create one and return a reference to that.
And as I'm writing this I realize why... references cannot be `null`.
`getOrInsert` here seems to be the Python "set_default" method on dicts, which is very useful at avoiding tedium in some basic data munging
It gives a caller the option of alternate logic based on the existence, or lack thereof, of a value.
> is that not just set?
No. The semantics of a "set" operation would overwrite an existing entry (if one exists).
https://nodejs.org/en/blog/release/v26.2.0
What I would expect with the inclusion of temporal, is having a section on nodejs docs about Rust addons, alongside the C and C++ sections.
Of course, complete lack of non-local non-GMT time zones is a huge downside.
(No affiliation, just a fan of VoidZero's consistently excellent tools.)
I moved some projects over to those from ESLint + Prettier and while the compatibility isn't 100% (I didn't need that), and the time to process a codebase went from like way over a minute with the old tools to a few seconds with theirs.
Evan You won't break the cycle, tale as old as time.
(I’m not disagreeing to remove it. It just took me a while to find out what happened to it)
There's the "types as comments" proposal[1] which could even land on browsers one day.
I started using the erasableSyntaxOnly setting in my tsconfig to get ready for this.
[1] https://tc39.es/proposal-type-annotations/
Release notes: https://nodejs.org/en/blog/release/v25.7.0
Issue: https://github.com/nodejs/node/pull/61262
https://caniuse.com/?search=Temporal
Adding websocket would simplify stuff tremendously, as well as make deployments much, much more secure.
I see that Deno has WebSockets, but I've never used them: https://docs.deno.com/api/web/~/WebSocket
I (also) basically use only one package: ws.
https://blog.platformatic.dev/bun-is-fast-until-latency-matt...
Even the complicated NextJS runs with Bun: https://nextjs.org/conf/session/nextjs-bun
Do you have a source for your claim?