inout verses ref

Spacen Jasset spacenjasset at yahoo.co.uk
Mon Mar 10 09:09:22 PDT 2008


These two attributes seem to do similar things. Infact, do they do the 
same thing? Or is it that in the case of ref a reference is passed, and 
in the case of inout a value is copies in via the stack and then passed 
back out?

Why would one use inout instead of ref since inout must be slower for 
larger objects.


More information about the Digitalmars-d-learn mailing list