Operation on Inter-Tuple types
monarch_dodra
monarchdodra at gmail.com
Tue Feb 12 13:56:45 PST 2013
On Tuesday, 12 February 2013 at 21:43:00 UTC, bearophile wrote:
> monarch_dodra:
>
>> If we follow the rule of "least surprise" and that "things
>> which are common behave the same", it might be safer to keep
>> this behavior.
>
> equal and cmp and OnHash among tuples of the same type must be
> supported if all the types they contain support those
> operations. If you remove that behaviour tuples become much
> less useful.
Did you really mean "Tuples of the same type"? Because I don't
think that was bein argued, and I agree with the conclusion.
> What's worth discussing is the opposite, so if it's a good idea
> to allow other operations among tuples if their types support
> those operations.
>
> Bye,
> bearophile
What other operations are you thinking about? Maybe a generic
opDispatch?
More information about the Digitalmars-d
mailing list