Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!uxc!garcon!garcon.cso.uiuc.edu!grunwald From: grunwald@flute.cs.uiuc.edu (Dirk Grunwald) Newsgroups: comp.lang.c++ Subject: Re: Should C++ follow C's footsteps? Message-ID: Date: 27 Feb 89 19:30:38 GMT References: <4800051@m.cs.uiuc.edu> <8902@alice.uucp> <2438@crete.cs.glasgow.ac.uk> Sender: news@garcon.cso.uiuc.edu Organization: University of Illinois, Urbana-Champaign Lines: 24 In-reply-to: eric@snark.uu.net's message of 25 Feb 89 04:54:44 GMT eric@snark.uu.net (Eric S. Raymond) writes... C's for() construct is the most powerful available in any real-world language. This is almost true, but there's a good reason to change it. Right now, you can't say: for (int i = 0; ....... etc ); for (int i = 0; ....... etc ); because the C++ scope rules follow the C scope rules here. I think this is a major pain in the rear -- I try to restrict the scope of variables as much as possible to reduce possible errors. This is a case where a divergence from C would be useful (and it's not clear to me it would break anything else) -- Dirk Grunwald Univ. of Illinois grunwald@flute.cs.uiuc.edu