DIP 1020--Named Parameters--Community Review Round 1

Dukc ajieskola at gmail.com
Wed Apr 3 13:16:06 UTC 2019


On Sunday, 31 March 2019 at 12:33:56 UTC, Mike Parker wrote:
> This is the feedback thread for the first round of Community 
> Review for DIP 1020, "Named Parameters":
>
> https://github.com/dlang/DIPs/blob/39dbbbe5e4618abd4c4b41eb0edd16547858ddf5/DIPs/DIP1020.md
>
> All review-related feedback on and discussion of the DIP should 
> occur in this thread. The review period will end at 11:59 PM ET 
> on April 14, or when I make a post declaring it complete.
>
> At the end of Round 1, if further review is deemed necessary, 
> the DIP will be scheduled for another round of Community 
> Review. Otherwise, it will be queued for the Final Review and 
> Formal Assessment by the language maintainers.
>
> Please familiarize yourself with the documentation for the 
> Community Review before participating.
>
> https://github.com/dlang/DIPs/blob/master/PROCEDURE.md#community-review
>
> Thanks in advance to all who participate.

I think this must go to formal assessment together with DIP1019 
(named arguments lite). In fact, these two DIPs are close enough 
that you could consider merging them together.

What I prefer about DIP1019 is the syntax, and the fact that you 
can reorder arguments. However, I'd like to keep the ability from 
this DIP to combine unnamed parameters with named ones.

I propose that you let the caller to reorder named parameters 
freely. It should not cause complications, because they do not 
affect the overloading resolution anyway. Internally, the 
compiler could order named parameters alphabetically. Add that to 
a better syntax, and it starts to sound tempting.


More information about the Digitalmars-d mailing list