HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by alec | Hacker News Reader
Parent
Full thread
alec
·
That function is valid Lua.
View on HN
silentbicycle
·
No, the curly braces have a different meaning (lists and tables, what JavaScript calls "object literals"). In Lua, it'd be
function sum(a,b) return a+b end
Close, though. (The semicolon is optional, and typically only used with multiple statements on one line.)
Reply on news.ycombinator.com