Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
panic
on Sept 30, 2013
|
parent
|
context
|
favorite
| on:
Tessel: The end of web development as we know it
It's the same in JavaScript:
x = 5; // global var x = 5; // local
Lua just replaces
var
with
local
:
x = 5 -- global local x = 5 -- local
icambron
on Sept 30, 2013
|
next
[–]
"JavaScript Done Right" requires actually doing it right.
riquito
on Sept 30, 2013
|
prev
|
next
[–]
Whatever javascript does, it does not make Lua's default global variables look any better
nilkn
on Sept 30, 2013
|
parent
|
next
[–]
To be fair, using 'local' instead of 'var' does make the situation a lot clearer.
woah
on Sept 30, 2013
|
prev
[–]
'Use strict';
catwell
on Oct 2, 2013
|
parent
[–]
This is actually what we do in Lua, often written `require "pl.strict"`...
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: