[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: AW: AW: AW: non-locals are only sometimes global?
- From: David Kastrup <dak@...>
- Date: Wed, 21 Jul 2010 14:02:51 +0200
"Warlich, Christof" <christof.warlich@thermofisher.com> writes:
>> You've been using C/C++ too long :)
> Probably ;).
I don't think that I have seen any C++ style guide encourage anything
but block local loop variables, written like
for (int i=0; i<j; i++) ...
In fact, given C++' propensity to have variables with runtime
implications when instantiated and destroyed, it is usually a good idea
to minimize their life time.
And I have pretty much _never_ seen anybody use an actual _global_
variable for loop control, whether we are talking C or C++.
It is such an excessively bad idea that I would not care to see it as a
default in Lua.
--
David Kastrup
- References:
- non-locals are only sometimes global?, Warlich, Christof
- Re: non-locals are only sometimes global?, steve donovan
- AW: non-locals are only sometimes global?, Warlich, Christof
- Re: AW: non-locals are only sometimes global?, Peter Odding
- AW: AW: non-locals are only sometimes global?, Warlich, Christof
- Re: AW: AW: non-locals are only sometimes global?, Peter Odding
- AW: AW: AW: non-locals are only sometimes global?, Warlich, Christof
- Re: AW: AW: non-locals are only sometimes global?, Matthew Wild
- AW: AW: AW: non-locals are only sometimes global?, Warlich, Christof