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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: f43e6,b87849933931bc93 X-Google-Attributes: gidf43e6,public X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public From: "Vassili Bykov" Subject: Re: Exceptions as objects (was Re: What is wrong with OO ?) Date: 1997/02/10 Message-ID: <01bc1713$930ab060$752d54c7@vbykov.hip.cam.org>#1/1 X-Deja-AN: 217775547 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: Communications Accessibles Montreal, Quebec Canada newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng Date: 1997-02-10T00:00:00+00:00 List-Id: Robert A Duff wrote in article ... > 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. > >(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.) Sorry, but the post I replied to discussed Ada and C. Your Smalltalk points are correct but Smalltalk is unique (again :-). Unlike most other "mainstream" languages it provides delayed evaluation ("blocks")--something without which you *cannot* build control constructs for languages with applicative-order evaluation, while unlike Scheme and CL's closures the syntax of blocks is extremely brief. This is why you can build control constructs as functions without the need for syntactic sugar for usability. If you disagree with the first statement, try to write "while as a function" in C or similar language. If you disagree with the second, imagine a bare-bones Scheme-like system with only "lambda", "define" and "if": it is *all* you need to have any control construct and write any program, but it will be unreadable without syntactic abstraction a macro system gives. (Macros are out of bounds because they extend the compiler, not the program.) --Vassili