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.