Discussion Thread: DIP 1030--Named Arguments--Final Review

Arine arine1283798123 at gmail.com
Thu May 21 19:44:25 UTC 2020


On Thursday, 21 May 2020 at 00:35:21 UTC, 12345swordy wrote:
> On Wednesday, 20 May 2020 at 20:01:51 UTC, Arine wrote:
>> On Wednesday, 20 May 2020 at 03:04:13 UTC, 12345swordy wrote:
>>> On Wednesday, 20 May 2020 at 02:09:27 UTC, Arine wrote:
>>>> On Tuesday, 19 May 2020 at 08:01:09 UTC, Timon Gehr wrote:
>>>>> On 19.05.20 04:35, Arine wrote:
>>>>>> On Tuesday, 19 May 2020 at 01:07:38 UTC, Timon Gehr wrote:
>>>>>>> [...]
>>>>>> 
>>>>>> And that's better for readability? Both methods are 
>>>>>> equally as bad. That one may be worse because it is an 
>>>>>> undocumented "feature".
>>>>>> 
>>>>>
>>>>> I am not sure what your point is. Are you trying to argue 
>>>>> that the suggestion is on the same level or worse than the 
>>>>> originally proposed
>>>>>
>>>>> int foo(int _dkfjjiufheuehgthu, long 
>>>>> _yer_mother_was_a_hamster, double 
>>>>> _I_did_not_read_the_documentation);
>>>>>
>>>>> ?
>>>>>
>>>>> If that is not your point, I think we have nothing to 
>>>>> discuss.
>>>>
>>>> Both are equally as bad in terms of readability. One is 
>>>> worse because it uses an implementation detail that can 
>>>> change at any time.
>>>
>>> So if the implementation detail is standardized, would you 
>>> still object to this?
>>>
>>> -Alex
>>
>> Both methods are terrible. A pull request that used either 
>> method in phobos would be rightfully rejected today. It 
>> doesn't bode well when such a destructive practice is 
>> suggested by the creator of a language, and then they 
>> completely fall silent from the discussion. I hope he doesn't 
>> have have the same holier than though mindset as that other 
>> individual that clearly stated they don't care about having 
>> any kind of discussion on the subject at all. That's fine by 
>> me, it's clear as night and day to me. Practicality seems to 
>> be going out the door lately anyways.
>
>
> void fun(int,int)
> _paramater[0] alias x;
> _paramater[1] alias y;
> }
>
> I don't see anything "destructive" about this, given that we 
> have the alias feature.
>
> -Alex

Editors that use the signature to get parameter names to help 
while you are writing code. It will have to be able to identify 
that pattern, and realistically you could define a parameter 
multiple times or not at the beginning of the function.

That also reminds me of the old C style function declarations, 
where the type and name were separated.

double foo( a , real )
     double *real;
     int a;
{
}

Not exactly the same, but it most definitely is a step backwards.

Then you also get into the problem of documentation for 
parameters. It is an overall net loss that just creates more 
problems of it's own. It'd make more sense to fix the problem 
here with named parameters, than to pass down the problem to 
something else.


More information about the Digitalmars-d mailing list