Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

this is why bugs exist

Name: Anonymous 2006-09-11 16:24

The reason why bugs exist in software amounts to one word (well technically two):

BRAINFARTS

look at this... I didnt catch this for a whole hour in my code:

Vector3D Vector3D::add(Vector3D vect)
{
    Vector3D v;
    v.x = x * vect.x;
    v.y = y * vect.y;
    v.z = z * vect.z;

    return v;
}


;_;

I'm not even drunk or high.  Why the shit did I do this?  i must be stupid

sigh

Name: Anonymous 2006-09-11 23:58

I agree with >>14, especially when dealing with a language that has properties. Of course, C++ doesn't support that as part of spec yet. Booo.

In the case of Vector3D, all it's for is a wrapper to simplify mathematical transformations on the (well defined and understood) data contained within, so I don't see what's wrong with tossing getters/setters. Seriously, why would you need to hide x, y, z?

That's not to say getters and setters don't have their place.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List