Article View: comp.std.c
Article #3646Re: Wishful thinking: return-parameter
From: Markus Freericks
Date: Thu, 03 Aug 1995 18:50
Date: Thu, 03 Aug 1995 18:50
19 lines
1687 bytes
1687 bytes
In article <3vq5so$8td@wsrcom.wsr.ac.at> hjp@wsrdb.wsr.ac.at (Peter Holzer) writes: > You cannot return multiple values in C anyway, so this is moot. You Sure it is moot, but this discussion is about possible extensions to C, not about the current standard (the thread started out as an advocacy of named return parameters, and I noted that those were only worthwhile if multiple results were allowed). I think that named return parameters would simplify (or at least orthogonalize) the language, but that's very much a matter of taste. > can return a structure and are free to initialize only some of its > fields. And you are also free to change or not change locations to > which pointers are passed to the function. Yup, but both solutions introduce inefficiencies, as they practically (*) forbid the compiler to use registers for passing back the results. Plus, both options look clumsy (another big IMHO, of course). -- Markus
Technical Details
Message-ID:
<3vr29c$33q@news.cs.tu-berlin.de>Path:
arc1-ca.pugleaf.net!cs.tu-berlin.de!mfxReferences:
<3ver2u$8bk@caip.rutgers.edu> <3viv5u$bkv@news.cs.tu-berlin.de> <3vjlmk$8co@caip.rutgers.edu> <3vkvmm$rtt@news.cs.tu-berlin.de> <3vl6b2$dne@solutions.solon.com> <3vnqah$1ev@news.cs.tu-berlin.de> <3vq5so$8td@wsrcom.wsr.ac.at>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cs.tu-berlin.de!mfx From: mfx@cs.tu-berlin.de (Markus Freericks) Newsgroups: comp.std.c Subject: Re: Wishful thinking: return-parameter Date: 03 Aug 1995 18:50:32 GMT Organization: TU Berlin Fachbereich Informatik Message-ID: <3vr29c$33q@news.cs.tu-berlin.de> References: <3ver2u$8bk@caip.rutgers.edu> <3viv5u$bkv@news.cs.tu-berlin.de> <3vjlmk$8co@caip.rutgers.edu> <3vkvmm$rtt@news.cs.tu-berlin.de> <3vl6b2$dne@solutions.solon.com> <3vnqah$1ev@news.cs.tu-berlin.de> <3vq5so$8td@wsrcom.wsr.ac.at> NNTP-Posting-Host: lenin.cs.tu-berlin.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit In-reply-to: hjp@wsrdb.wsr.ac.at's message of 03 Aug 1995 10:46:00 MET