SAS dumps Amiga
15-Mar-95 08:36:44
Sb: #46153-SAS dumps Amiga
Fm: Greg Comeau@Comeau Cmptg 72331,3421
To: Hani Yakan 73657,3025
>when confronted with a problem, I can come up with considerable different
>solutions (given a time limit, i.e deadlines) when I aproach the problem
>using procedural methods (using C), or object oriented methods (using
>C++).
Yes, many find this.
>My object oriented aproach results in a solution that supports more
>functions for the present and is more expandable for the future, compared
>to the procedural aproach even though the requirement is the same. But
>guess what?, my C++ code is larger and supports more functionality and
>sometimes executes slower. But I'm coding for the next project or the
>class library that can be used by others.
So, IOWs, you are not coding to the requirement. That of course can be ok,
since you know your needs and goals. This is of course a delicate balance,
since you don't want to overspecify too quickly and will no doubt iterate
through enough of it.
>I found that going through the process of object oriented analysis, by
>nature forces me to provide more functionality within the problem domain.
In my experience, I do not find that the result of just my OOA.
If reuse is my goal, it might be indicative though.
As well, I feel providing even a little more has potential problems
unless tredded on lightly. I'd be interested in hearing more about
your situations.
>I also found that the procedural aproach is more 'implementation' oriented
>which results in solutions that are specific to the problem but not to the
>general case.
This could be the result of many things, but I find this less so per se.
OTOH, yes, since say C doesn't have some of the capabilities of say C++,
some of those "natural solutions" have different centrics, and so with
things like focus on algorithms vs data, etc, things might appear this way.
>So I was not saying that C++ results in slower code than C because its
>C++, but because I have a better tool (C++) to aproach problems.
I don't understand.