DIP 1019--Named Arguments Lite--Final Review
nkm1
t4nk074 at openmailbox.org
Fri Aug 30 01:45:11 UTC 2019
On Thursday, 29 August 2019 at 21:53:36 UTC, Olivier FAURE wrote:
> On Wednesday, 28 August 2019 at 09:37:13 UTC, nkm1 wrote:
> I don't think it's obvious.
I guess it depends on whether you see functions parameters as a
kind of struct (or both structs and parameters as kinds of
tuple). Too me, they look almost indistinguishable. In any case,
D already has certain rules for initializing structs and arrays,
and the same rules _can_ be applied to parameters, so, using a
variant of Occam's razor here...
> There's trade-offs to consider, that people have spent pages
> debating.
That's what I'm saying, no? The DIP should discuss these
trade-offs (but it doesn't).
Maybe D doesn't even need named parameters. Perhaps C-style
struct literals with designated initializers would be perfectly
sufficient (and more useful in general, and that also would
adress Jonathan Davis' concerns about rewriting Phobos). That all
should be discussed in the DIP.
More information about the Digitalmars-d
mailing list