3 ms·
Some good points, I know where you're coming from, but when I read this: This sounds like typical OO. It is, but in practice, it's little more than plain old p
by narag 16y ago
Some good points, I know where you're coming from, but when I read this:
This sounds like typical OO. It is, but in practice, it's little more than plain old procedural programming with syntactic sugar.
...it makes me think that syntactic sugar is undervalued, or maybe that some very useful and important procedural programming practices are now placed under the OO label.
- loup-vaillant 16y agoBoth, actually. A computer engineering professor once told me that OO was about instantiation. In procedural code, you would have only one point, probably held in a global variable. My C code would look OO to him. Chris Okasaki once wrote a programming language for one of his CS classes. For whatever reason, he chose to make indentation mandatory, and he got rid of semicolons and curly brackets. The result strongly suggests that beginners are more influenced by such syntactic sugar, rather than by deeper properties, like type inference. http://okasaki.blogspot.com/2008/02/in-praise-of-mandatory-indentation-for.html http://okasaki.blogspot.com/2008/02/in-praise-of-mandatory-i...
- arethuza 16y agoThe strategy code has for instantiating things sounds orthogonal to OO-ness to me.
- Retric 16y agoIMO, OO programming is using internal API's to split programs into smaller pieces that have both data and code and talk to each other by passing messages. From that perspective inheritance is simply extending an API with another API that has new behavior and uses the existing API etc. So, while syntactic sugar helps with bookkeeping, OO is a programming technique not a language feature. With great discipline you could write OO code in C, but languages that pick up the slack help you write clean code faster and avoid the temptation, late at night, to use "goto" that one time it really helps. (http://xkcd.com/292/ http://xkcd.com/292/) PS: This is from the perspective of someone that came to OO later on. I think people who are taught OO programming early have trouble separating the how code using the abstraction from what it actually is.