From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,b87849933931bc93 X-Google-Attributes: gidf43e6,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Exceptions as objects (was Re: What is wrong with OO ?) Date: 1997/02/07 Message-ID: #1/1 X-Deja-AN: 215186828 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> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng Date: 1997-02-07T00:00:00+00:00 List-Id: In article <01bc14ab$3ce476e0$752d54c7@vbykov.hip.cam.org>, Vassili Bykov 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