home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / next / programm / 6053 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  5.5 KB

  1. Xref: sparky comp.sys.next.programmer:6053 comp.lang.objective-c:523
  2. Path: sparky!uunet!ogicse!news.u.washington.edu!carson.u.washington.edu!bungi
  3. From: bungi@carson.u.washington.edu (Timothy J. Wood)
  4. Newsgroups: comp.sys.next.programmer,comp.lang.objective-c
  5. Subject: Re: General OOP Question
  6. Message-ID: <1992Sep8.164922.11325@u.washington.edu>
  7. Date: 8 Sep 92 16:49:22 GMT
  8. Article-I.D.: u.1992Sep8.164922.11325
  9. References: <1992Sep7.234748.15598@monu6.cc.monash.edu.au>
  10. Sender: news@u.washington.edu (USENET News System)
  11. Organization: University of Washington
  12. Lines: 94
  13.  
  14. ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson) writes:
  15. >If you have some time, give this one a shot.
  16.  
  17.   Sure ... I will, however, keep my points to the realms of ObjC, C++, NeXT
  18. and X since those are the OOPL/UIs that I am most familiar with.  All of
  19. this is IMHO.  If your a C++/X lover, beware -- I'm not.  Those who wish to
  20. correct me by stating that X is not a UI but a graphics protocol may
  21. refrain from doing so.  I like Display Postscript anyway (which X is
  22. attempting to use now ... snicker, snicker).
  23.  
  24.  
  25. >Why would you rather develop a GUI application using OOP than using 
  26. >a structured language like C?
  27.  
  28.   First, note that OOP doesn't exactly imply non-structured.  ObjC is a
  29. good example of how OOP/structured programming can interact.
  30.   Anyway... I find that OOP is good for GUI programming for the following
  31. reasons, among others.
  32.  
  33.   (1)  Standarization of an interface across a platform.  Regardless of what
  34.   a number of people say, customizable interfaces are not all that they are
  35.   cracked up to be.  A standardized interface cuts the time needed to learn
  36.   an program.  Richard Stallman (in a talk at the University of Washington,
  37.   in reference to interface infringement lawsuits) described this with the
  38.   example of the steering wheel/clutch/brake/accelerator of a car.  This is
  39.   a good interface.  It is standardized.  Wouldn't we all have a beastly
  40.   time if it weren't.  Standardization also allows you to write a fairly
  41.   small/dependable/fast window manager since to don't have to worry about
  42.   which of the N custom settings some user is going to use.
  43.  
  44.   (2)  Its easier.  Even if you don't use a product like IB, it is fairly
  45.   easy to set up your own interface objects in code.  At least this is true
  46.   on the NeXT.  I wouldn't want to speculate on XView since it has two basic
  47.   problems, C++ and X.
  48.  
  49. >What benefits/problems do you see in using OOP ?
  50.  
  51.   (1)  The obvious: reusability of code in terms of both subclassing them
  52.   and being able to use them in lots of places due to the seperation
  53.   between interface and implementation.  Seperation of client/server with
  54.   no fuss.
  55.  
  56.   (2)  OOP almost forces you to come up with a good design, or at least a
  57.   better one (in terms of understandability) than you would with an non-OOP
  58.   language.  This is not saying that you can't make a nice design in a
  59.   non-OOP language, but if the program is more complex than a while loop,
  60.   it will almost invariably happen that the code looks either OOPesque or
  61.   like some functional language (say LISP). 
  62.  
  63.   (3)  There aren't enough standardized objects yet.  OMG is working on
  64.   this, though (with NeXT as the major contributor).
  65.  
  66.   (4)  C++.  Yuck.  It doesn't even have an ANSI standard yet but everyone
  67.   and their anteater is using it.  One might argue that ObjC isn't
  68.   standardized yet either, but then again, you can describe the differences
  69.   between ANSI-C and ObjC in 30 pages (this is how long the NeXT ObjC manual
  70.   was under 1.x/2.x ... haven't seen the 3.0 one yet but they haven't added
  71.   a whole lot).  In comparision, my copy of 'The Annotated C++ Reference
  72.   Manual (ANSI Base Document)' (Ellis/Stroustrup) is 407 pages.  And these
  73.   are all very *ugly* pages.  The 2nd Ed 'The C++ Programming Language'
  74.   (Stroustrup) (*Why* is is using this title?  He is not a K nor an R, but
  75.   an S!)  quite a bit easier to read, but at the expense of an even longer
  76.   text.  Multiple inheritence is evil.  Protocols are *much* cleaner (NeXT
  77.   ObjC under 3.0)  C++ doesn't have calltime binding of methods, or even a
  78.   generic object type.  How could anyone expect to get much benifit from
  79.   object polymorphism without calltime binding?  How many *compilers* (not
  80.   C++ -> C front ends) are there?  One that I know of: g++.  And I doubt
  81.   that even FSF implemented all the features of C++.  I haven't heard of a
  82.   compiler *or* translater that implements templates.  Of course this is
  83.   because they don't have a generic object type or calltime binding.
  84.   I guess that's enough flagellation of the deceased equine.
  85.     I'm very much relieved that FSF is finally getting their ObjC runtime
  86.   ready.  Perhaps this will slow down (and even reverse??  Oh Please let it
  87.   be!) the spread of C++.  At a minimum, it will force the C++ community to
  88.   clean up their language (wash their mouths out with soap, we will!)
  89.   Ok.  That's really enough now.  I think.  Maybe.
  90.  
  91. >How do you feel the use of a UIMS (IB) helps ?
  92.  
  93.   (1)  No code.  All you have to do is drag the pieces of your interface
  94.   where you want them and connect them.  On the NeXT, you can even test
  95.   your interface *without* compiling.  IB will even let you deisgn you own
  96.   palettes of UI objects.
  97.  
  98.   (2)  No code!  You can see exactly what your interface is going to look
  99.   like.  You don't have to sit down with graph paper and figure out a bunch
  100.   of numbers to describe your interface.
  101.  
  102.   (3)  NO CODE!  If you wan't to change your interface five times a day, no
  103.   problem.  It only took you two minutes to set it up in the first place.
  104.  
  105.  
  106. Tim Wood
  107. The Omni Group
  108.