DIP 1020--Named Parameters--Community Review Round 1
JN
666total at wp.pl
Wed Apr 10 10:30:34 UTC 2019
On Tuesday, 9 April 2019 at 19:46:47 UTC, Seb wrote:
> On Monday, 1 April 2019 at 11:39:50 UTC, rikki cattermole wrote:
>> As the author of this DIP, I have created a list of actionable
>> items I expect to include in the next iteration of the DIP.
>>
>> [...]
>
> BTW are you aware of the recently accepted PEP 570 for Python
> [1]?
>
> It allows library authors optionally to control exactly which
> parameters are positional and which are keyword-only and which
> are both.
>
> [1] https://www.python.org/dev/peps/pep-0570/
Wow, that syntax looks bad. I like Dart's syntax for that:
void enableFlags([bool foo]) {...} <- positional arg
void enableFlags({bool foo}) {...} <- keyword arg
void enableFlags({@required bool foo}) {...} <- required keyword
arg
More information about the Digitalmars-d
mailing list