From slices to perfect imitators: opByValue
bearophile via Digitalmars-d
digitalmars-d at puremagic.com
Thu May 8 14:08:35 PDT 2014
Andrei Alexandrescu:
> That's an interesting idea. More generally, there's the notion
> that making user-defined types as powerful as built-in types is
> a Good Thing(tm).
Regarding the management of const for library-defined types,
sometimes I'd like the type T1 to be seen as equal to the type
T2, this could save me some hassles during the usage of tuples:
alias T1 = const Tuple!(int, int);
alias T2 = Tuple!(const int, const int);
I think T1 and T2 should be equivalent for built-in tuples.
Bye,
bearophile
More information about the Digitalmars-d
mailing list