Comment

Comment by 201984

Lua basically already has ternary operators anyway since "and" and "or" short circuit. I also don't see the need of adding additional syntax for it.

  local x = condition ? value_a : value b
  local x = condition and value_a or value_b
parent 201984 4 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton