IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 1 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Oh, I dislike Stepanov plenty as well
Because he doesn't "get" OO either.

He thinks generic programming using templates is somehow special and doesn't understand that templates are a hack that allows what real OO languages already have naturally - duck typing (if it quacks, its a duck).

Here's what he says:


Question:
This mean a radical change of mind from both imperative and OO thinking. What are the benefits, and the drawbacks, of this paradigm compared to the "standard" OO programming of SmallTalk or, say, Java?

Answer:
My approach works, theirs does not work. Try to implement a simple thing in the object oriented way, say, max. I do not know how it can be done. Using generic programming I can write:
template <class StrictWeakOrdered>
inline StrictWeakOrdered& max(StrictWeakOrdered& x,
StrictWeakOrdered& y) {
return x < y ? y : x;
}

and
template <class StrictWeakOrdered>
inline const StrictWeakOrdered& max(const StrictWeakOrdered& x,
const StrictWeakOrdered& y) {
return x < y ? y : x;
}

(you do need both & and const &). And then I define what strict weak ordered means. Try doing it in Java. You can't write a generic max() in Java that takes two arguments of some type and has a return value of that same type. Inheritance and interfaces don't help. And if they cannot implement max or swap or linear search, what chances do they have to implement really complex stuff? These are my litmus tests: if a language allows me to implement max and swap and linear search generically - then it has some potential.


Notice he doesn't discuss a Smalltalk implementation - because he doesn't have a clue what Smalltalk is.

C++ made a fundamental mistake of tying protocol to inheritance hierarchy. Java copied this error.

Stepanov cares about representation of algorithms that allow the algorithms to act on arbitrary data structures regardless of type - as long as they respond to a protocol. That's dynamic typing. He doesn't know that because he thinks C++ is OO. Its not. Neither is Java. OO is dynamically typed. Ask Alan Kay. He made up the word and he made it up to describe Smalltalk. Smalltalk is OO. Anything not like Smalltalk is not OO. CLOS is OO, Python is OO, Ruby is most OO, C++ and Java are not.



"Whenever you find you are on the side of the majority, it is time to pause and reflect"   --Mark Twain

"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."   --Albert Einstein

"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses."   --George W. Bush
New Just so you know
under your definition, object rexx is also OO; completely dynamically typed... sort of. It's just that Everything Is A String, so there's never any confusion:P
--\n-------------------------------------------------------------------\n* Jack Troughton                            jake at consultron.ca *\n* [link|http://consultron.ca|http://consultron.ca]                   [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\n* Kingston Ontario Canada               [link|news://news.consultron.ca|news://news.consultron.ca] *\n-------------------------------------------------------------------
New OK
Never tried it. I'll take your word for it.



"Whenever you find you are on the side of the majority, it is time to pause and reflect"   --Mark Twain

"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."   --Albert Einstein

"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses."   --George W. Bush
New It's good if you ever find yourself working on IBM stuff
I love rexx. It is really easy to program, and really easy to figure out what you were doing last year when you wrote 'that thing'.
--\n-------------------------------------------------------------------\n* Jack Troughton                            jake at consultron.ca *\n* [link|http://consultron.ca|http://consultron.ca]                   [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\n* Kingston Ontario Canada               [link|news://news.consultron.ca|news://news.consultron.ca] *\n-------------------------------------------------------------------
     Stroustrup remains delusional about his evil little creation - (tuberculosis) - (9)
         Re: Stroustrup remains delusional about his evil little crea - (systems) - (8)
             Not really - (warmachine) - (1)
                 Generics are a pain in the rear - (admin)
             Oh, I dislike Stepanov plenty as well - (tuberculosis) - (3)
                 Just so you know - (jake123) - (2)
                     OK - (tuberculosis) - (1)
                         It's good if you ever find yourself working on IBM stuff - (jake123)
             Knowing Todd... - (ChrisR)
             MOP! I.Love.It. -NT - (mmoffitt)

This space intentionally left blank.
58 ms