Alvin,
I view C, C++, C#, VB.NET, RPG, Smalltalk, Fortran as an implementation
detail. That the analysis & design can and should still be done in a Object
Orient manner (OOA & OOD).
Remember I said Object Oriented Methodology, not specifically Object
Oriented Programming.
The best definition I have heard recently for an Object/Class was a Unit of
Responsibility.
In the simplest case: Within your C program you can define "units of
responsibility" that could center around a struct for example. You can
define all the behavior for a "unit of responsibility" that accept this
struct as a parameter (the 'this' pointer). All the attributes would be
members of this struct. Granted is not as elegant as C# or VB.NET, in many
ways it lacks polymorphism & inheritance. However IMHO its still oriented
toward objects...
In the extreme case: Have you ever looked at how COM is implemented for C?
Granted some OOP "purists" will deny that COM is OOP, however IMHO it is
definitely a subset of OO. Using manually created vtables (with some bizarre
macros, you can have polymorphism in C. (not sure if I would go to that
extreme). Remember that the early C++ compilers were actually translators
that converted the C++ code into C code, that the C compiler would then
compile... I'm sure one could define macros to "come close"...
i guess you can get a car to roll on ball bearings for rims but what would
be the point of it? it wasn't designed for that. see what i'm saying?
Which is my point! you can do OOA & OOD then implement it in C, if you
happen to be constrained to C!
Hope this helps
Jay
the
C
how?
i guess you can get a car to roll on ball bearings for rims but what would
be the point of it? it wasn't designed for that. see what i'm saying?
--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/2bz4t
the