Re: [Plib-devel] PLIB developers needed.
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-08-11 04:56:04
|
Sam Stickland wrote: > > I believe the revised ANSI C++ scoping rules now forbid declaration of variables in a for statement, completely. But this is fairly > recent, so different compilers are still tolerating it in different ways. *WHAT* ??!? That's insane. > The scoping for this sort of declaration was always cloudy at best, so it's probably for the best. Not really. In the first C++ spec, it said (quite clearly) that the scope was as if you'd declared the variable immediately before the 'for' loop. It was realised by everyone that this was a bad decision - and Bjarne said so in the 'ARM' (Annotated Reference Manual) - but he decided not to wreck all those existing programs by changing the language to correct his error. When ANSI first looked at the problem, they decided that it was better to have the language "right" - even if that did cause some initial pain. The pain was dealt with by *everyone* except Microsoft... And now you are telling me that they are *both* wrecking the language *and* pissing off a million programmers? Geeze. That's a *terrible* decision. > Bottom line - don't do it. Well, that was always the bottom line for portable code...but I had hopes that one day Microsoft would either *DIE* or fix their fscking compiler and we could all get on with life. Ack! They should really have left the C++ spec as it was rather than keep tinkering with it. IMHO, just about everything that's happened to C++ since Bjarnes' first implementation has been a BAD mistake. -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |