On 5/4/2011 12:55 PM, Peter Alexander wrote:
On 4/05/11 4:08 AM, Walter Bright wrote:For example, should I pass an object around by ref or by value? In C++, I've got to convert all my -> to . or vice versa, throughout the code. With D, I just change the alias declaration.How do you manage to change a pass-by-value to pass-by-reference by changing an alias?
alias Vec3!T* V; T dot(V a, V b);Now I can change V to whatever I want, pointer or value, without having to edit anything but the alias.