Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: overuse of auto is dangerous Date: Thu, 02 Apr 2020 10:19:27 -0700 Organization: None to speak of Lines: 34 Message-ID: <874ku1u7og.fsf@nosuchdomain.example.com> References: <87tv2pqm0i.fsf@nosuchdomain.example.com> <86imii6knh.fsf@linuxsc.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="3819bc2a00f7d30b644a1b83a43bdfb4"; logging-data="15331"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19IdU18ZMCe5e8cr0u9qJ5E" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cancel-Lock: sha1:earrXPplHhp+oMJ4r6uwzRQ9crs= sha1:GpMHX85Qk/gz00g8ep4o0gyk0bc= Xref: csiph.com comp.lang.c++:72758 Tim Rentsch writes: > Keith Thompson writes: >> David Brown writes: >>> On 14/03/2020 18:23, Bart wrote: >> [...] >>>> C, and I assume C++, allows this: >>>> >>>> void fn(int sum, int prod); >>>> void fn(int prod, int sum) {....} >>>> >>>> If only the declaration is visible at the call-site, it will be misleading. >>> >>> Yes. That is one thing I strongly dislike about the languages, and it >>> is a big hinder to having a simple system of named parameters. >>> However, it is also clear that there are some /good/ reasons for >>> allowing different names for parameters. >> >> [...] >> >> Good reasons for using a different name for the same parameter in a >> declaration and definition of a function? I can't think of any. > > Do you think it's possible that, for reasons of their own, > someone would deliberately choose to use a different name for > some function parameter where the function is declared, as > compared to where the function is defined, even though you > can't think of any good reason to do so? The answer to this deeply uninteresting question is yes. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */