I want to create my own Tuple type

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon Jan 11 20:36:30 UTC 2021


On Monday, 11 January 2021 at 19:25:06 UTC, Paul Backus wrote:
> I agree that immutability has benefits, but I don't see why 
> tuples should be singled out for special treatment in this 
> regard.

Oh, and another reason is that scalars can usually be passed by 
value with impunity, but you might want to pass tuples by 
reference as it could save you some copying in a significant way. 
And pass by reference would make the tuple vulnerable to 
mutation... (since we don't have head-const).




More information about the Digitalmars-d-learn mailing list