From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public From: Simon Wright Subject: Re: Porting (was ADA and Pascal etc) Date: 1997/11/03 Message-ID: #1/1 X-Deja-AN: 287038684 X-NNTP-Posting-Host: pogner.demon.co.uk [158.152.70.98] References: <34557f2b.1934172@news.mindspring.com> <63bhta$g2e@bgtnsc03.worldnet.att.net> <345AB871.413A@dynamite.com.au> <63d5l4$tub$1@helios.crest.nt.com> <878495810snz@genesis.demon.co.uk> Organization: At Home Newsgroups: comp.lang.ada,comp.lang.c Date: 1997-11-03T00:00:00+00:00 List-Id: fred@genesis.demon.co.uk (Lawrence Kirby) writes: > In article <63d5l4$tub$1@helios.crest.nt.com> > kaz@helios.crest.nt.com "Kaz Kylheku" writes: > > ... > > >What's worse is that mixed declarations and statements are likely going to be > >part of the new C language. > > Actually that finally resolves one of the biggest bugbears I have when > writing C. My experience has shown clearly that localising declarations > can be a big win for readability. Currently I have to use extra { }'s to do > that in some cases (notably for switch cases). With C9X I will finally be > able to write code in a natural way according to my preferred coding style. > Of course like may other features of C it will be possible to abuse this > to horrific effect. Nevertheless overall it is a win for the language. How does the C++ style localise scope? With the exception of variables declared in "for" loops, the scope's from the point of declaration to the end of the current block, not so? I think that you're better off with the {}! -- Simon Wright Work Email: simon.j.wright@gecm.com GEC-Marconi Radar & Defence Systems Voice: +44(0)1705-701778 Command & Information Systems Division FAX: +44(0)1705-701800