[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Globals vs. Locals
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 04 Aug 2005 15:32:49 -0300
> 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 http://www.tiobe.com/tpci.htm), 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