|
Alistair wrote: >Correct me if I'm wrong (Hans?) but doesn't method overloading (as opposed >to operator overloading) require some fancy form of late binding. Now I am >not a compiler expert but I'm almost certain that RPG does not do this >special form of late binding. I know it does late binding of some >description but is this enough. What? Another invitation to participate in this thread? In the "pure" OO languages, the message sent to an object is usually interpreted at run-time. That is a form of "late binding". But that's not the only way to implement "overloading". Look at how C++ handles it. The function names are munged in a way that encodes the types of arguments in the name. (The same could potentially be done for RPG procedures without any other OO support.) In this way, names are resolved at bind time. Some systems, like SOM, allow you to choose when to resolve names. BTW, there's really no difference between "method" overloading and "operator" overloading. >By the way I take issue with the statement >that overloading is not part of OO. METHOD overloading is very much part of >polymorphism which is a key section of OO. Yes you could argue that the >mechanics behind it are found in non OO languages but this misses the point >IMO. I'm not sure there's any point to argue with here. I suppose it's a matter of definition. I see "overloading" not as a "part" of OO, but more of a "characteristic" of OO. OO in its pure sense deals with sending messages to objects. Since you can send a "print" message (for example) to any object, OO has this "overloading" characteristic. I don't mean to criticize anyone in particular, but I think a lot of people miss the point with OO. Maybe this is an example of the classic prescriptivist/descriptivist debate, but I (as a descriptivist) see terms like "polymorphism" and "overloading" and "inheritance" as characteristics of OO, and not as a "recipe" for OO. OO can be learned without ever having to memorize the meanings of those fancy 4 and 5 syllable words adopted by the computer science intelligentsia. The essence of OO can be summed up using common one syllable words like "is" and "has". Cheers! Hans Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.