Named Arguments Status Update - Overloading by name
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Tue Apr 9 20:52:48 UTC 2024
On 10/04/2024 8:49 AM, Uranuz wrote:
> Hello! I have a question. Why you decided to use ":" symbol as separator
> of name and value of parameter in function call syntax? For aestetical
> reason "=" looks better (at my opinion). f(x=2, y=10) Maybe this is
> because I have Python background where "=" is used for this? ;-)
It is already used for AssignExp which is also a valid argument.
Whereas : is used with struct initializer syntax so has a comparable use
case in both D and the C family.
More information about the Digitalmars-d
mailing list