lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> which is pretty much the opposite of the major languages?
> So far I thought it was safer if variables are local by default, [...]

I am not very sure, but I think that, of the 10 most "major" programming
languages (according to, only two (Python
and PHP) use local by default.

Visual Basic, C, Java, C++, C#, and Delphy have no default, although if
you say nothing inside the function the variable can yet be global but
cannot be local, so they seem nearer to a "global by default". Perl and
JavaScript have global by default.

-- Roberto