Tuples a first class feature, manu's new unary operator and named arguments

12345swordy alexanderheistermann at gmail.com
Fri May 8 22:29:01 UTC 2020


On Friday, 8 May 2020 at 22:20:03 UTC, Timon Gehr wrote:
> On 08.05.20 22:38, 12345swordy wrote:
>> [...]
>
> No, too ugly. Anyway, there should not be a difference in 
> features for tuples and multiple function arguments. In 
> mathematics, those are the same thing. (I.e. each function has 
> one parameter, which may be a tuple.) Ideally, built-in tuples 
> and multiple function arguments should interact in a way that 
> is consistent with this principle.
>
>> [...]
>
> That's true even now, so this is not a strong argument. The 
> problem is that existing names are inconsistent because naming 
> is hard and the authors were not aware that function names are 
> part of the public API. Attributing this situation to named 
> arguments is simply a mistake.
>
>> [...]
>
> I don't see why you would start a new DIP instead of forking 
> mine, but in any case, syntax for a named argument tuple should 
> be (x: 0, z: 0), not (int x = 0, int z = 0).

I do not see anyone done that before, so I assume that was 
consider it to be a bad thing. Looks like you give me permission 
then to fork it then. I will give it some needed polish.

-Alex


More information about the Digitalmars-d mailing list