[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-dev] [IMP-commits] r1297 - trunk/modules/algebra/include



Daniel Russel wrote:
> I don't understand that sentence. But, if you are saying that Vector3D()
> should be Vector3D(0,0,0) I disagree and prefer it to be left undefined
> (or in a defined, but non-useful state). And thing Transformation3D
> should be changed to match.

Another way to think of things is consistency with primitive types. If
in your code you say

int i;
std::cout << i;

you will get some undefined output, since primitive types are not
initialized (except for file-scope static variables, but we should
probably avoid those anyway). For consistency

Vector3D i;
std::cout << i;

should do something similar.

	Ben
-- 
                      http://salilab.org/~ben/
"It is a capital mistake to theorize before one has data."
	- Sir Arthur Conan Doyle