oop-ish question....
Question/opinions:
Would it ever be acceptable to do something like this:
Definition:
class Foo
{
public:
void method1(int someint);
int somedata;
}
(implementation is irrelevant...)
Using:
Foo MyFoo;
MyFoo.method1(MyFoo.somedata); <---- this is what bothers me.
I saw this done by a senior engineer where I work. I'm thinking it's just cause he's not skilled in the ways of OOP. The language this was done in was actually Clarion (never heard of it before my current job), but I think this fits here since c++ is so heavily object oriented. Would c++ even let you do this? I've never tried.
I would never do anything like this, btw.
Would it ever be acceptable to do something like this:
Definition:
class Foo
{
public:
void method1(int someint);
int somedata;
}
(implementation is irrelevant...)
Using:
Foo MyFoo;
MyFoo.method1(MyFoo.somedata); <---- this is what bothers me.
I saw this done by a senior engineer where I work. I'm thinking it's just cause he's not skilled in the ways of OOP. The language this was done in was actually Clarion (never heard of it before my current job), but I think this fits here since c++ is so heavily object oriented. Would c++ even let you do this? I've never tried.
I would never do anything like this, btw.
