Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: OT: improve this simple algorithm? Date: Fri, 29 Nov 2019 06:08:41 -0800 Organization: A noiseless patient Spider Lines: 18 Message-ID: <86wobi7p1y.fsf@linuxsc.com> References: <87a790zn7z.fsf@bsb.me.uk> <_85zF.5075$II7.2317@fx17.iad> <8h8rse1ra0sel6snvfbrucvcbobn2okhg5@4ax.com> <86a78f8pto.fsf@linuxsc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="81b92e3fa8397acac1ab5cf195ff75cd"; logging-data="28980"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18r+w9R/tiXyrgleBN1WaPNl7ciG4M4ToQ=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:R5e3s8yG8HLiRZ9iexGQjdHeK5g= sha1:JzI8TQvzmbjShqKUvUaa2AFWJrA= Xref: csiph.com comp.lang.c:148287 Richard Damon writes: >> [..how we might have arrived at the current semantics for >> declarations in for() loops..] > > I will admit that could be how it started. I have been using both > languages for a long time and can easily have mixed the rules that > differed. I should say here that my comments were meant only to clarify the actual history. What you were saying is basically right, just an accidental switch of C and C++, which is perfectly understandable given how long ago it happened and what was going on with the two languages at the time. I was confused at first when I looked just at the C historical documents, but when I dug a little deeper and looked at C++ it all made sense. Despite how my comments may have sounded my intention was to affirm the core thesis that you were suggesting. Sorry if it came across otherwise.