News for hackers. Stuff that matters.
Re:When or If by adastra22 on Monday March 14, 2022 @06:09PM (#30679094)
Would if/else have been considered optimal to you if you hadn’t already been conditioned (ha!) that way by other programming languages?

“When” actually seems better in a purely declarative language.

Re:When or If by andreareina on Monday March 14, 2022 @11:43PM (#30681444)
Maybe it's prior exposure to lisp, but I wouldn't expect "when" to have an "else" clause. Can't think of an idiomatic natural-language case with that structure either.
Re:When or If by IshKebab on Tuesday March 15, 2022 @02:25PM (#30688988)
I have never used SASS and if/else is obviously better than when/else.