On 03/31/14 09:28, Walter Bright wrote: > On 3/30/2014 8:32 PM, Adam D. Ruppe wrote: >> >> structs can pretty easily be reference types too: > > Or just: > > alias S* C; > > Voila! Use C as the type instead of S*.
C c = ...; auto a = c[42]; Boom! This is a catastrophic failure mode. Op overloads may be added to the pseudo-C after it's already written and working, and then a) the bug might go unnoticed, and b) fixing it requires API changes. See also my other reply. artur
