Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel-eecis!gatech!csulb.edu!hammer.uoregon.edu!hunter.premier.net!feed1.news.erols.com!insync!uunet!in1.uu.net!uucp6.uu.net!world!bobduff
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Exceptions as objects (was Re: What is wrong with OO ?)
Message-ID: <E59AsK.5LC@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
References: <5acjtn$5uj@news3.digex.net> <5d93d3$nhs$1@goanna.cs.rmit.edu.au> <5dds5b$gcs@mulga.cs.mu.OZ.AU> <01bc14ab$3ce476e0$752d54c7@vbykov.hip.cam.org>
Date: Fri, 7 Feb 1997 23:33:56 GMT
Lines: 28
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:246433 comp.lang.smalltalk:51212 comp.lang.eiffel:18276 comp.lang.ada:57319 comp.object:60923 comp.software-eng:53530

In article <01bc14ab$3ce476e0$752d54c7@vbykov.hip.cam.org>,
Vassili Bykov <vbykov@cam.org> wrote:
>Control constructs cannot *in principle* be a part of the standard library.

Control constructs *are* part of the standard library in Smalltalk.  And
it's an elegant way to do things.  I'm not sure what you mean by "*in
principle*" in this case.

Probably (I suspect) the whileTrue:do: thing (or whatever it's called)
in Smalltalk is implemented as a "built in" thing in most
implementations, but that's not semantically necessary.  If Smalltalk
had a goto primitive, one could write the while loop primitive in
Smalltalk.  (Actually, I guess you can do it via recursion, if you're
willing to count on tail recursion elimination.)  In any case, the fact
that it's "built in" to the compiler does not imply that it's "built in"
to the semantics -- I mean, a C compiler is well within its rights to
"build in" the printf function (i.e. special case it in some way that
might get better efficiency).

>(Unless you take Lisp or Scheme and consider macros as part of the
>library--which, strictly speaking, they are not).

No, they're not macros, they're "normal" messages/methods (that is,
procedure calls), with "blocks" as parameters.  (I'm not sure why macros
are considered out of bounds here, but in any case, macros aren't needed
in this case.)

- Bob
