home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / object / 4604 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.7 KB  |  36 lines

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!torn!nott!cunews!cunews!knight
  3. From: knight@mrco.carleton.ca (Alan Knight)
  4. Subject: Re: Object hidden state and side effects
  5. Message-ID: <knight.724801566@cunews>
  6. Sender: news@cunews.carleton.ca (News Administrator)
  7. Reply-To: knight@mrco.carleton.ca (Alan Knight)
  8. Organization: Carleton University
  9. References: <1992Dec16.65250.10645@kei.is.s.u-tokyo.ac.jp> <1992Dec16.175126.14968@midway.uchicago.edu> <1992Dec17.163916.25512@kei.is.s.u-tokyo.ac.jp> <1992Dec18.152823.888@midway.uchicago.edu>
  10. Date: Sat, 19 Dec 1992 21:46:06 GMT
  11. Lines: 25
  12.  
  13. In <1992Dec18.152823.888@midway.uchicago.edu> dave@alex.uchicago.edu (Dave Griffith) writes:
  14.  
  15. >In article <1992Dec17.163916.25512@kei.is.s.u-tokyo.ac.jp> jeff@is.s.u-tokyo.ac.jp writes:
  16. >"Everything is an object", even such IMHO obvious non-objects like control
  17. >structures.  Of course you can map everything to objects, I just see few 
  18. >good reasons to do so.  
  19.  
  20. Control structures in Smalltalk aren't objects, they're methods. (at
  21. least the obvious ones like ifTrue:, whileTrue:, do:). The advantage
  22. of this is that it gives one a unified form for them and reduces the
  23. complexity of the basic language. It's the same idea as functional
  24. language that implement control structures using first-class
  25. functions, or Prolog implement it's version of control structures
  26. using logic clauses. It makes the language more extensible, since I
  27. can add new control structures (e.g. a case statement) that are not in
  28. any way different from the built-in ones.
  29.  
  30.  
  31. -- 
  32.  Alan Knight  knight@mrco.carleton.ca  +1 613 788 2600x1027 
  33.  Dept. of Mechanical and Aerospace Engineering              
  34.  Carleton University, Ottawa, Ontario, Canada, K1S 5B6      
  35.  
  36.