DIP 1020--Named Parameters--Community Review Round 1
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Apr 1 19:03:42 UTC 2019
On 4/1/19 10:41 AM, rikki cattermole wrote:
> On 02/04/2019 3:09 AM, Atila Neves wrote:
>> There are known reasons why using angle brackets complicates lexing
>> (cough! C++! cough!), so the syntax choice is odd. Is there a
>> particular reason why the usage suggested here avoids the issues?
>
> As far as I'm aware, we should have no problems with adapting dmd-fe to
> support it.
>
> Of course I could have missed something (either in dmd or outside). So
> it would be good to have somebody else double check that statement.
I don't see one either, but then a lot of very smart people didn't see
that a<b>(c) could mean both (a < b) > (c) and (a<b>)(c).
Much more recently, many folks, even after having learned from the
experience just mentioned, didn't realize that a.operator<=>(b) could
mean both (a.operator<=) > (b) and (a.operator<=>)(b).
At any rate, this is unlikely to win a beauty contest:
void fun(<bool a=b>c>);
Also, it seems named parameters without reordering is like a wedding
without music.
More information about the Digitalmars-d
mailing list