This is the mail archive of the
mailing list for the GCC project.
Re: Named parameters
- From: Arnaud Charlet <charlet at adacore dot com>
- To: Toon Moene <toon at moene dot org>
- Cc: David Brown <david at westcontrol dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 16 Mar 2015 20:15:00 +0100
- Subject: Re: Named parameters
- Authentication-results: sourceware.org; auth=none
- References: <5506FF8D dot 2000408 at westcontrol dot com> <5507298D dot 1080206 at moene dot org>
> >If only the first variant is allowed (with the named parameters in the
> >order declared in the prototype), then this would not affect code
> >generation at all - the designators could only be used for static error
> >If the second variant is allowed, then the parameters could be re-ordered.
> This is indeed very useful - Fortran has this since the Fortran 90
> standard, albeit without the dots (it's unambiguous in Fortran).
Right, same for Ada:
foo (a => 1, b => 2, c => 3);
foo (c => 3, b => 2, a => 1);