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