Worst ideas/features in programming languages?

Timon Gehr timon.gehr at gmx.ch
Mon Jan 3 07:42:48 UTC 2022


On 1/3/22 8:40 AM, Timon Gehr wrote:
> On 12/29/21 7:48 AM, Walter Bright wrote:
>> On 12/28/2021 9:14 PM, Walter Bright wrote:
>>> Actually, I agree with the need for tuples, and am very open to a 
>>> good design for it.
>>
>> I'd like to see something that unified arrays, structs, argument lists 
>> (for functions).
> 
> I would like to do that, but I think it would break code like this:
> 
> void foo(int a,int b){}
> void foo(int[2] x){}
> 
> After unification, those two function definitions would now be the same.
> 
> Is this what you have in mind?

And there is also this:

void foo(T...)(T args){}

int[2] x;

foo(x); // foo!(int[2]) and foo!(int,int) would now need to be the same


More information about the Digitalmars-d mailing list