[comp.lang.c++] Re^2: named return values

guido@piring.cwi.nl (Guido van Rossum) (08/09/89)

rjc@maui.cs.ucla.edu (Robert Collins) writes:
>>m1.plus(matrix(m2).times(2)).plus(m3)
>That is REALLY ugly.  I am using C++ so I don't have to write
>code like that!

Oh come on.  With assignment operators you can get this, which is
efficient and clear enough:

	matrix tmp = m2;
	tmp *= 2;
	m1 += tmp;
	m1 += m3;

--
Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam
guido@cwi.nl or mcvax!guido or guido%cwi.nl@uunet.uu.net
...and let's keep signature size to a minimum...