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

  1. Path: sparky!uunet!mcsun!uknet!keele!seq1.kl.ac.uk!csd05
  2. From: csd05@seq1.kl.ac.uk (Yufan Hu)
  3. Newsgroups: comp.object
  4. Subject: dynamic vs static method declaration
  5. Message-ID: <4041@keele.keele.ac.uk>
  6. Date: 9 Sep 92 11:26:54 GMT
  7. Sender: csd05@seq1.keele.ac.uk
  8. Reply-To: csd05@seq1.kl.ac.uk (Yufan Hu)
  9. Organization: University of Keele, England
  10. Lines: 43
  11.  
  12. Hi, there,
  13.  
  14. I have some problems with implementing a persistent object base. Could
  15. some people kindly hel me to clear them out?
  16.  
  17. Background: Implementation of a persistent object base, with objects, classes
  18.     and methods all persistent. The method to a message is lookup 
  19.     dynamically at run time.
  20.  
  21.     When a class is defined, I know there are at least two ways to declare 
  22.     methods (or the interface) of the class. One is to include all method 
  23.     declarations statically in the class definition, such as what is
  24.     done in C++. The another one is to dynamically add methods to  a
  25.     class after the class is created, such as in Smalltalk-80.
  26.  
  27. Questions:
  28.     1. Is there any other ways of declaring methods for a class? Please
  29.        give the references.
  30.     2. Can you help me to find out any advantages and disadvantages of 
  31.        these methods?
  32.     3. Could you please point out any references to this problem?
  33.  
  34. Tuitionally I would choose the dynamic one because I believe it is more 
  35. flexible. But if methods are dynamically added to a class:
  36.  
  37. 1. Does this break any "law" of object-orientness (data abstraction?
  38.    encapsulation? information hidding? inheritance?).
  39.  
  40. 2. Can any existing behaviours be changed after a new method is added?
  41.    Please give a example.
  42.  
  43.  
  44. Thank you very much for your help. Please answer via e-mail, I will post
  45. a summery.
  46.  
  47. -Yufan
  48. ==============================================================================
  49. JANET : yufan@uk.ac.keele.cs     || Yufan Hu
  50. BITNET: yufan%cs.kl.ac.uk@ukacrl || Dept. of Computer Science, Univ. of Keele,
  51. other : yufan@cs.keele.ac.uk     || Keele, Staffordshire.  ST5 5BG.  U.K.
  52. ------------------------------------------------------------------------------
  53. Telephone: +44-782-621111 x 7357    FAX:  +44-782-713082
  54. ==============================================================================
  55.