`ref T` should be a type!!

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Apr 2 11:05:51 UTC 2019


On 4/2/19 4:11 AM, Walter Bright wrote:
> On 4/1/2019 5:55 PM, Atila Neves wrote:
>> Factually incorrect.
> 
> I suspect Rubn has confused the syntactical conflation of arrays with 
> pointers in C, and the implicit coercion of arrays to pointers, as them 
> being the same. They simply aren't the same, as they are semantically 
> separated by one level of indirection.

You forgot to mention that top-level "const" is ignored in function 
parameters (for the signature and mangling but not the implementation). 
Now the fact that "42" is just ignored in the declaration below is 
indistinguishable from conspiracy:

void fun(int a[42]);


More information about the Digitalmars-d mailing list