Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
igl
· 9y ago · 0 comments
Everything is an expression. Including if statements. There is no need of such syntax abominations.
Comments
[–]
jashkenas
9y ago
Bingo. Remember when you first first learned the ternary operator syntax? I recall thinking something along the lines of, "Wow, that's cryptic!"
result = if condition then success else failure
[–]
sgustard
9y ago
Sure, but other coffee operations like x||=5 are also abominations. Brevity and purity are often at odds and the choices made by a language can be arbitrary.