logoalt Hacker News

demilicioustoday at 1:30 AM3 repliesview on HN

That’s why “if” should just be an expression


Replies

matheusmoreiratoday at 1:35 AM

This is the best answer in my opinion. Ternary is just sugar for an expressive if. LuaJIT seems to be focusing on adding new syntax though, maintainer might not be amenable to updating existing semantics.

show 1 reply
rirzetoday at 3:15 PM

As long as the language supports lazy evaluation and short-circuiting through expressions, then great.

NuclearPMtoday at 3:30 AM

Yep. Everything should be.