HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by pkolaczk | Hacker News Reader
Parent
Full thread
pkolaczk
·
Scala doesn't have a ternary operator as well.
View on HN
madiathomas
·
I haven't used Scala before. What is their reasoning for that?
melolife
·
In Scala everything is an expression so you just use an if statement:
val foo = if(x) y else z
madiathomas
·
Thanks. It makes sense because it doesn't have statement. Ternary operator wasn't going to be possible.
Reply on news.ycombinator.com