Is D 0.163 D 1.0?
kris
foo at bar.com
Tue Jul 25 13:09:05 PDT 2006
Chris Nicholson-Sauls wrote:
> Don Clugston wrote:
>
>> Nooooooooo!!!!
>> Am I the only person who has hundreds of local variables called 'var'?
>> (mostly variants in Win32 code).
>>
>> A quick google search for 'var cpp' showed a million hits, a fair
>> chunk of them are local variables in C++ code. It's a very popular
>> variable name.
>
>
> Actually I do feel your pain, but I still vote for it. Waaay back in
> the day I used to do a lot of LambdaMOO server hacking, and therein I
> discovered my first Var struct. (That'd be about 1996 I think it was.)
> Now, ten years later, I am working on BovisMOO... and I'm still using a
> Var struct (albeit a much cleaner one), and plenty of temporary Var's
> named, yes, 'var.'
>
> But I can always just rename them to 'tmp', or something else.
> (Actually a lot of them would probably get renamed 'result' since that's
> what they generally are.)
>
> -- Chris Nicholson-Sauls
I suspect the focus should be directed elsewhere, Chris?
There's nothing wrong with using "auto" for implicit-type -- it's the
confusion with raii that's the issue, yes?
I suspect the ratio of raii usage to implicit-type usage would be
overwhelmingly in favour of the latter. Thus, it would seem to make
sense to leave implicit-type "auto" just as it is, and change raii to
use something else instead; such as "scope" ?
void main()
{
auto i = 10;
auto foo = new Foo;
auto scope bar = new Bar;
auto scope wumpus = new Wumpus;
}
class Foo {}
class Bar {}
scope class Wumpus {}
More information about the Digitalmars-d
mailing list