Skip to content

Comment on Safe Assignment

Comments

This would make certain things more convenient, but wouldn't be very versatile and would feel terrible in terms of overall language semantics

Try expressions (mentioned in other comments) seem significantly better, but still feel like they're trying to tack on something that fits awkwardly into the original language design (though that's kind of the history of JavaScript)

Anyway, I'd use those all the time if they landed

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.