Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Naturally, the main catch is that this only detects the violation at run-time. It also won't stop you from accidentally overwriting a global variable that already exists.


> It also won't stop you from accidentally overwriting a global variable that already exists.

That's also solvable using metatables.


Do the declarations in 5.5 prevent overwriting? That sounds tricky to define and implement.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: