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: Sun, 15 Mar 2020 15:41:17 -0700 Organization: None to speak of Lines: 23 Message-ID: <87tv2pqm0i.fsf@nosuchdomain.example.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="c46eafee64e9f7aff06b31f0a056d12f"; logging-data="7354"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Rq7Dhh4MjYEoTtoCwJjna" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cancel-Lock: sha1:U8OQulVv6YDvWEEk4SNzEaq9rUc= sha1:bcd/R0aq8czziz/hOkOTS8T6/9s= Xref: csiph.com comp.lang.c++:72308 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. -- 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 */