comp.lang.ada
 help / color / mirror / Atom feed
  • * Re: Real OO
           [not found] ` <4if7s5$bfk@ra.nrl.navy.mil>
           [not found]   ` <DoDqH4.29v@world.std.com>
    @ 1996-03-29  0:00   ` Brian Rogoff
      1 sibling, 0 replies; 191+ messages in thread
    From: Brian Rogoff @ 1996-03-29  0:00 UTC (permalink / raw)
    
    
         Of course there is no inherent limitation in Ada. If one wanted to be 
         absolutely true to the tenets of OOP, one could do something like this:
    
         package Number is 
           type Base_Number is abstract tagged private;
           function "+" (L, R : Base_Number) return Base_Number is abstract;
    	 -- also operators for "-", "*", ... etc.
         private
    	type Base_Number is abstract tagged null record;
         end Number;
    
         <rest of example deleted for space>
    
    	Before you exclaim, "Arghhhhhhh" let me suggest that there
    	might be circumstances in which you really want to create your
    	own very restricted variation of the arithmetic operators for
    	the concrete types derived from this abstract class. In fact,
    	this could be the foundation abstract class for the famous
    	Fractions package, the Vector Arithmetic package, or several
    	other packages that service non-standard number models.
    
    	Furthermore, although we customarily use numbers defined in the
    	Ada LRM, nothing prevents us from approaching number definitions
    	in a more "pure" OOP mode.  I realize, such an approach will be rare, 
    	but I can imagine safety-sensitive applications where it might make 
    	sense to do something such as this.
    
    	Richard Riehle
    	adaworks@netcom.com
    
    I think that the main concern that I would have with such an approach, 
    i.e. representing numbers as tagged types, is the overhead of having a 
    tag associated with each numeric item. If you define your "Rational" type 
    this way, and then start manipulating Rational matrices, can you be 
    reasonably sure that your Ada compiler will eliminate the tags if your 
    Rational is not involved in runtime dispatching? Or will you get an 
    M x N x sizeof(tag) overhead for every M x N RationalMatrix?
    
    I think a better approach might be to use generic formal package parameters 
    to create type signatures for the numeric types you create. It is a little 
    syntactically heavy though, and I kind of wish there were a nicer way to do 
    this sort of thing in Ada...
    
    -- Brian
    
    
    
    
    ^ permalink raw reply	[flat|nested] 191+ messages in thread
  • * Re: Real OO
    @ 1996-05-02  0:00 Bob Crispen
      0 siblings, 0 replies; 191+ messages in thread
    From: Bob Crispen @ 1996-05-02  0:00 UTC (permalink / raw)
    
    
    
    Richard Riehle sez:
    
    >Robert Dewar (dewar@cs.nyu.edu) wrote:
    [snip]
    >: P.S. spaghetti code doesn't just mean code you don't like. It is a rather
    >: specific term used to described the non-nested chaotic control structures
    >: caused by undisciplined use of gotos or equivalent transfers of control.
    >: I think it is useful to keep this sense.
    >
    >  HmmmMMMMMMmmmmm. I guess we could characterize OOP as "ravioli code"
    >  rather than spaghetti code.  Each class is a little square of pasta
    >  enclosing the encapsulated delicacies.
    
    And often with about as much internal structure as a plate of ravioli.
    Good metaphor.
    
    >  Anyone for Pizza code?
    
    Dump a side order of spaghetti on top of a pepperoni pizza and you
    get a perfect representation of what some new kids draw when I ask
    them, "Draw me a picture of your main system elements and the dataflows
    between them." -- shortly before they pick up the paper and say,
    "Uh, let me get back to you on this."
    
    Don't forget pasta fazool code, where the subprograms and processes
    intercommunicate through a bowl of variable soup (shared memory).
    
    Preferable to all of these is spumoni code -- or at least the kind of
    spumoni you can get in Alabama (often spoken of as "little Italy" by
    people who are severely geographically impaired) where the ice cream
    looks exactly like those diagrams of Unix.
    
    Bob "Vito" Crispen
    revbob@eight-ball.hv.boeing.com
    Speaking for myself, not my company
    
    
    
    
    ^ permalink raw reply	[flat|nested] 191+ messages in thread
    [parent not found: <4id031$cf9@dayuc.dayton.saic.com>]
    [parent not found: <4hneps$1238@watnews1.watson.ibm.com>]
    [parent not found: <JSA.96Mar13143956@organon.com>]

    end of thread, other threads:[~1996-05-22  0:00 UTC | newest]
    
    Thread overview: 191+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <DoDLr7.JDB@world.std.com>
         [not found] ` <4if7s5$bfk@ra.nrl.navy.mil>
         [not found]   ` <DoDqH4.29v@world.std.com>
    1996-03-26  0:00     ` Real OO AdaWorks
    1996-03-29  0:00   ` Brian Rogoff
    1996-05-02  0:00 Bob Crispen
         [not found] <4id031$cf9@dayuc.dayton.saic.com>
    1996-03-18  0:00 ` Norman H. Cohen
    1996-03-18  0:00   ` The Right Reverend Colin James III
    1996-03-19  0:00     ` Norman H. Cohen
    1996-03-21  0:00       ` Don Harrison
    1996-03-20  0:00 ` Don Harrison
    1996-03-20  0:00 ` Norman Cohen giving IBM a bad name The Right Reverend Colin James III
    1996-03-20  0:00   ` Colin James III giving humans a bad name (was Re: Norman Cohen giving IBM a bad name) Mark R Okern - F95
    1996-03-20  0:00     ` Real OO John G. Volan
    1996-03-21  0:00       ` Scott Leschke
    1996-03-21  0:00         ` Norman H. Cohen
    1996-03-21  0:00         ` Robert A Duff
    1996-03-22  0:00         ` Don Harrison
    1996-03-20  0:00   ` Dale Stanbrough
    1996-03-21  0:00     ` Richard Pitre
    1996-03-22  0:00 ` Don Harrison
    1996-03-22  0:00   ` Norman H. Cohen
    1996-03-26  0:00     ` Don Harrison
    1996-03-26  0:00       ` Norman H. Cohen
    1996-03-29  0:00         ` Don Harrison
    1996-03-27  0:00       ` Thomas Beale
    1996-03-28  0:00         ` Don Harrison
    1996-03-22  0:00   ` Norman H. Cohen
    1996-03-27  0:00     ` Don Harrison
    1996-03-27  0:00       ` Norman H. Cohen
    1996-03-28  0:00         ` Jacob Gore
    1996-04-04  0:00         ` Don Harrison
    1996-04-04  0:00           ` Jon S Anthony
    1996-04-04  0:00           ` Tucker Taft
    1996-04-04  0:00             ` Tucker Taft
    1996-04-12  0:00               ` Don Harrison
    1996-04-12  0:00             ` Don Harrison
    1996-04-15  0:00               ` Robert I. Eachus
    1996-04-19  0:00                 ` Don Harrison
    1996-04-19  0:00                   ` Matt Kennel
    1996-04-20  0:00                     ` Bob Hathaway
    1996-04-23  0:00                     ` Don Harrison
    1996-04-04  0:00           ` Robb Nebbe
    1996-04-04  0:00           ` Laurent Guerby
    1996-03-23  0:00   ` Joachim Durchholz
    1996-03-26  0:00     ` Norman H. Cohen
    1996-04-04  0:00       ` Don Harrison
    1996-04-04  0:00         ` Jon S Anthony
    1996-04-12  0:00           ` Don Harrison
    1996-04-17  0:00             ` Jon S Anthony
    1996-04-19  0:00               ` Don Harrison
    1996-04-19  0:00                 ` Jon S Anthony
    1996-04-23  0:00                   ` Don Harrison
    1996-04-24  0:00                     ` Don Harrison
    1996-04-29  0:00                     ` Jon S Anthony
    1996-04-30  0:00                       ` Robert Dewar
    1996-04-30  0:00                         ` Amit Patel
    1996-04-30  0:00                           ` Robert A Duff
    1996-05-07  0:00                             ` Amit Patel
    1996-05-01  0:00                           ` Norman H. Cohen
    1996-05-01  0:00                             ` Colin James III (The Rt Rev'd)
    1996-05-07  0:00                             ` Amit Patel
    1996-04-30  0:00                         ` Robert A Duff
    1996-04-30  0:00                           ` Robert Dewar
    1996-05-01  0:00                             ` Richard Bielak
    1996-04-30  0:00                           ` Amit Patel
    1996-05-01  0:00                           ` Adam Beneschan
    1996-05-02  0:00                             ` Ell
    1996-05-01  0:00                         ` Don Harrison
    1996-05-01  0:00                           ` David Hopwood
    1996-05-03  0:00                             ` Don Harrison
    1996-05-01  0:00                           ` Don Harrison
    1996-05-02  0:00                             ` Robert A Duff
    1996-05-03  0:00                               ` Don Harrison
    1996-05-03  0:00                                 ` Robert A Duff
    1996-05-06  0:00                                   ` Don Harrison
    1996-05-06  0:00                                     ` Robb Nebbe
    1996-05-06  0:00                                     ` Robert A Duff
    1996-05-02  0:00                           ` Robert A Duff
    1996-05-03  0:00                             ` Don Harrison
    1996-05-10  0:00                             ` Don Harrison
    1996-05-01  0:00                         ` AdaWorks
    1996-05-08  0:00                         ` Joachim Durchholz
    1996-05-03  0:00                       ` Don Harrison
    1996-05-03  0:00                         ` Dave Fitch
    1996-05-07  0:00                         ` Jon S Anthony
    1996-04-30  0:00                     ` Joachim Durchholz
    1996-04-30  0:00                     ` Jon S Anthony
    1996-05-01  0:00                       ` Matt Kennel
    1996-05-03  0:00                         ` Don Harrison
    1996-05-02  0:00                       ` Don Harrison
    1996-05-02  0:00                         ` Robert I. Eachus
    1996-05-02  0:00                         ` Jon S Anthony
    1996-05-03  0:00                           ` Don Harrison
    1996-05-06  0:00                             ` Jon S Anthony
    1996-05-06  0:00                         ` Jon S Anthony
    1996-05-06  0:00                       ` Don Harrison
    1996-05-06  0:00                         ` Don Harrison
    1996-05-07  0:00                         ` Jon S Anthony
    1996-05-13  0:00                           ` Don Harrison
    1996-05-09  0:00                         ` Jon S Anthony
    1996-04-24  0:00                 ` Joachim Durchholz
    1996-05-01  0:00                   ` Matt Kennel
    1996-05-02  0:00                     ` Don Harrison
    1996-05-07  0:00                   ` Joachim Durchholz
    1996-05-08  0:00                   ` Jon S Anthony
    1996-05-09  0:00                   ` Robert I. Eachus
    1996-04-30  0:00                 ` Jon S Anthony
    1996-05-03  0:00                   ` Don Harrison
    1996-05-07  0:00                     ` Jon S Anthony
    1996-04-30  0:00                 ` Joachim Durchholz
    1996-05-08  0:00                   ` Joachim Durchholz
    1996-05-10  0:00                   ` Jon S Anthony
    1996-05-02  0:00                 ` Jon S Anthony
    1996-05-06  0:00                 ` Jon S Anthony
    1996-04-08  0:00         ` Norman H. Cohen
    1996-04-08  0:00           ` Robert A Duff
    1996-04-09  0:00             ` Norman H. Cohen
    1996-04-10  0:00           ` Don Harrison
    1996-04-11  0:00           ` Jacob Gore
    1996-04-12  0:00           ` Don Harrison
    1996-04-12  0:00             ` Matt Kennel
    1996-04-15  0:00               ` Don Harrison
    1996-04-12  0:00             ` Jon S Anthony
    1996-04-13  0:00               ` Robert A Duff
    1996-04-16  0:00             ` Jon S Anthony
    1996-04-12  0:00           ` Don Harrison
    1996-04-12  0:00             ` Jacob Gore
    1996-04-16  0:00               ` Don Harrison
    1996-04-09  0:00         ` Valery CROIZIER
    1996-04-09  0:00         ` Jon S Anthony
    1996-04-09  0:00       ` Joachim Durchholz
    1996-05-02  0:00       ` Joachim Durchholz
    1996-05-05  0:00         ` Robert A Duff
    1996-05-05  0:00           ` Robert Dewar
    1996-05-06  0:00         ` Norman H. Cohen
    1996-05-07  0:00           ` Don Harrison
    1996-05-07  0:00             ` Jon S Anthony
    1996-05-08  0:00               ` Don Harrison
    1996-05-08  0:00             ` Norman H. Cohen
    1996-05-08  0:00               ` Robert A Duff
    1996-05-10  0:00                 ` Matt Kennel
    1996-05-10  0:00                   ` Robert A Duff
    1996-05-14  0:00                     ` Matt Kennel
    1996-05-15  0:00                       ` Robert A Duff
    1996-05-07  0:00         ` Amit Patel
    1996-05-07  0:00           ` The Right Reverend Colin James III
    1996-05-08  0:00           ` Don Harrison
    1996-05-08  0:00             ` Juergen Schlegelmilch
         [not found]               ` <Dr4538.D27@assip.csasyd.oz>
    1996-05-09  0:00                 ` Juergen Schlegelmilch
    1996-05-09  0:00                 ` Richard Riehle
    1996-05-10  0:00                   ` Tucker Taft
    1996-05-13  0:00                     ` Don Harrison
    1996-05-13  0:00                       ` Tucker Taft
    1996-05-14  0:00                         ` Don Harrison
    1996-05-14  0:00                           ` Steve Tynor
    1996-05-14  0:00                             ` Robert A Duff
    1996-05-15  0:00                             ` Don Harrison
    1996-05-14  0:00                           ` Robert A Duff
    1996-05-15  0:00                           ` Steve Tynor
    1996-05-15  0:00                             ` Robert A Duff
    1996-05-16  0:00                           ` James McKim
    1996-05-18  0:00                             ` Matt Kennel
    1996-05-20  0:00                               ` James McKim
    1996-05-22  0:00                                 ` Matt Kennel
    1996-05-14  0:00                         ` Joachim Durchholz
    1996-05-14  0:00                         ` Roger Browne
    1996-05-15  0:00                         ` Alexander Kjeldaas
    1996-05-15  0:00                         ` Steve Tynor
    1996-05-19  0:00                         ` Piercarlo Grandi
    1996-05-14  0:00                   ` James McKim
    1996-05-15  0:00                     ` Juergen Schlegelmilch
    1996-05-20  0:00               ` Joachim Durchholz
    1996-05-07  0:00       ` Joachim Durchholz
    1996-05-09  0:00         ` Don Harrison
    1996-05-09  0:00           ` Jon S Anthony
    1996-05-09  0:00           ` Joachim Durchholz
    1996-03-28  0:00   ` Joachim Durchholz
    1996-03-29  0:00     ` Norman H. Cohen
    1996-03-30  0:00       ` John G. Volan
    1996-03-26  0:00 ` Jon S Anthony
    1996-03-29  0:00 ` Joachim Durchholz
    1996-04-04  0:00   ` Don Harrison
    1996-04-04  0:00     ` Steve Tynor
    1996-04-08  0:00       ` Norman H. Cohen
    1996-04-09  0:00         ` Matt Kennel
    1996-04-04  0:00     ` Dominique Colnet
    1996-04-08  0:00     ` Matt Kennel
    1996-04-09  0:00       ` Norman H. Cohen
    1996-04-09  0:00     ` Robert C. Martin
    1996-04-10  0:00     ` J. Kanze
         [not found] <4hneps$1238@watnews1.watson.ibm.com>
         [not found] ` <Do3F1K.4xG@assip.csasyd.oz>
         [not found]   ` <4i455s$ijq@watnews1.watson.ibm.com>
    1996-03-15  0:00     ` Don Harrison
         [not found]       ` <DoBH80.9u9@world.std.com>
    1996-03-15  0:00         ` Mark A Biggar
    1996-03-15  0:00         ` Richard Pitre
    1996-03-16  0:00     ` Des  Kenny
         [not found] <JSA.96Mar13143956@organon.com>
    1996-03-15  0:00 ` Don Harrison
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox