× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: [Re: RPGILE V4.3 Gotcha] and OO design
  • From: Joel Fritz <JFritz@xxxxxxxxxxxxxxxx>
  • Date: Fri, 8 Oct 1999 09:07:16 -0700

  I'm in a mood for _serious_ ranting today.  If I have enough time I may
even get into pomposity.<g>

This example shows how hard it is to design something to be extensible and
how easy it is to misuse or misunderstand a theoretical approach to problem
solving.  

Object oriented design is a really cool idea.  It's also been promoted as a
panacea.  Unfortunately, it's like any other tool, you have to think about
it before you use it, and you have to do your best to use it correctly.  One
of my teachers in school gave us a list of criteria for developing recursive
algorithms.  Rule 1 was "It has to work."  

I know I've skipped rule 1 before, and I've suffered the consequences every
time.  No tool can protect you from yourself.

    
> -----Original Message-----
> From: boldt@ca.ibm.com [mailto:boldt@ca.ibm.com]
> Sent: Friday, October 08, 1999 6:13 AM
> To: RPG400-L@midrange.com
> Subject: Re: [Re: RPGILE V4.3 Gotcha]
> 
> 
> 

/*               Big Snip                                         */


> That section in that book illustrates the potential for overuse of
> inheritance.  For example, many OO texts use the example of
> employees in a company.  Using inheritance, you could design a base
> class called Employee.  You could then have derived classes called
> Manager and VicePresident, such that a Manager "is a" Employee, and
> a VicePresident "is a" Manager.  But what happens when an employee
> is promoted?  In this case, a better design would use "has a"
> relationships.  For example, an Employee "has a" Role, which could
> be regular employee, manager, or vice-president.  To promote an
> employee, simply assign a new Role to her.
> 
> 
> 
+---
| 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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.