Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
adastra22
on March 14, 2022
|
parent
|
context
|
favorite
| on:
When or If
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.
andreareina
on March 15, 2022
|
next
[–]
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.
IshKebab
on March 15, 2022
|
prev
[–]
I have never used SASS and if/else is obviously better than when/else.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
“When” actually seems better in a purely declarative language.