A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Structured programming is discipline imposed upon direct transfer of
control.
Object-oriented programming is discipline imposed upon indirect
transfer of control.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by rehans oberoi:
structured programming give more preference to functions
and control flow. and global data can be used by any functions .
so it is hard to do debugging
and object oriented programming give more preference to data
we can made data private or public.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Stan James:
All the things you learn to do good structured programming carry right over to OO - low coupling, high cohesion, expressive code, information hiding and so on.
You can look at OO as adding only a couple new ideas - most importantly inheritance
or you can look at OO as turning the whole world backwards.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
I don't think inheritance is even nearly as important as polymorphism
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Stan James:
I agree polymorphism is profoundly important, it just felt less "new" when I hit OO. I was able to call different programs by knowing their names (in a string, say) in most other languages I used and solved some of the same dependency and flexibility problems that I do with polymorphism. Call-backs and "user exits" gave some of the same feeling in other environments. So polymorphism felt pretty familiar.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by rehans oberoi:
and object oriented programming give more preference to data
we can made data private or public . so it helps in
debugging and maintaibility in large programs
Originally posted by Robert Hill:
If course it depends on your definition of large programs. I do not think that OO has a large advantage in maintainability or debugging, if at all. A well written C program can follow design patterns even though it is structured programming. OO does not always make sense in a program.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
OO makes *absolute* sense for large programs
Tony Morris
Java Q&A (FAQ, Trivia)
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Stan James:
I don't think OO languages are absent from deep OS and embedded systems (if they really are) because of the merits of OO vs something else, but because they often take more memory and cycles than hand-tuned low-level code.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Robert Hill:
Unitl OO is proven to be of value in programs of 10+ million lines of code, I stand by my statement.
And no OO does not make sense everywhere. Small embedded devices are still the domain of C(no I am not talking about cell phones), and probably will be until a legitimate C replacement comes along. Operating systems and most of the processes are still written in C and some assembly. When an OS(or something of similar complexity) gets written in a OO language that more or less enforces object use, then there will be something to talk about.
Of course where things *are* used and where things would *make sense* to be used are mostly orthogonal...
It makes me cringe everytime I read someone say that OO is always the way to go.
Just for the record, I'm not at all saying that OO is always the way to go. But *if* program size is a deciding factor at all, I'd definitely say that it has less value for *small* programs, where managing code dependencies isn't that important.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Tony Morris:
The term *absolute* here makes me cringe in ways unimaginable.
For the time being, I request that the term be removed from the statement, and replaced with something along the lines of "more sense than the available alternatives". Any objections?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus