Y
Hacker News
new
|
ask
|
show
|
jobs
by
sgustard
3196 days ago
CS breaks the ternary ?: operator which is a big headache for me.
1 comments
igl
3196 days ago
Everything is an expression. Including if statements. There is no need of such syntax abominations.
link
jashkenas
3196 days 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
link
sgustard
3194 days 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.
link