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: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: f43e6,b87849933931bc93 X-Google-Attributes: gidf43e6,public From: pcg@aber.ac.uk (Piercarlo Grandi) Subject: Re: Exceptions as objects (was Re: What is wrong with OO ?) Date: 1997/02/07 Message-ID: #1/1 X-Deja-AN: 215114146 sender: pcg@osfb.aber.ac.uk references: <5acjtn$5uj@news3.digex.net> <32dd9fc8.262114963@news.sprynet.com> <5cu43v$jkn@nntpa.cb.lucent.com> <5de797$1ksa@uni.library.ucla.edu> organization: Prifysgol Cymru, Aberystwyth 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: >>> "jmartin" == Jay Martin writes: jmartin> piercarl@sabi.demon.co.uk (Piercarlo Grandi) writes: piercarl> Well, yes and no. Not quite. It can be kludged, and I have piercarl> provided one such kludge, but adding to a language is easy but piercarl> non trivial. Since it is needed regardless of whether a piercarl> language provides it or not, it's better to have it done piercarl> cleanly and efficiently rather than as a kludge. piercarl> This is actually a general principle of system/language piercarl> design; there are a number of features which are essential, piercarl> and cannot simply be omitted; omitting them from the piercarl> primitives of the languages will simply mena that the piercarl> implementation burden shifts on the programmer. My two piercarl> favourite examples are spooling for operating systems and piercarl> generators for programming languages. There are OSes that piercarl> don't have spooling, and then it must be done by the user, by piercarl> multitasking her/imself; there are languages that don't have piercarl> generators, and then they must be simulated by the programmer, piercarl> usually via global variables or ``control blocks''. In either piercarl> case it is a waste. Dynamic scoping is another good example. jmartin> It seems to me you are assuming that dynamic scoping is necessary and jmartin> that a programmer will have to simulate it. It seems more prudent to jmartin> me to recognize the limitations and paradigm of your tool and just jmartin> implement it in the tedious and boring "normal" way. Ahhh, but what I have been arguing is merely the obvious: runtime customization of imlementations is a fact of life, whether one like sit or not, and dynamically scoped identifiers are the most direct/obvious/``simplest'' way to do it, e.g. environment variables in UNIX and similar facilities in most other systems/languages. It is well true that once can always perform a reduction from a program with statically or dynamically scoped global/fluid variables to one that does not have them, only parameters and local variables (and the latter can further be transformed into parameters): jmartin> Which in this instance is by passing parameters but this does not necessarily mean that it is desirable... In effect it is not very desirable, as long as the global/fluid variables left in teh program are clearly encapsulated. jmartin> or having different functions. This is in the general case unfeasible (there can be any number of procedures that one would want to do)... jmartin> [ ... strong preference for the bondage&discipline school of jmartin> programmign language design :-) ... ] jmartin> When you are in a room filled criminally insane programmers, jmartin> straightjackets nstart sounding like a cool idea. I must confess that this approach actually strikes a chord with me, except that I'd rather have a BFG-9000 than a set of straitjackets :-). But then on balance, emotions set aside, I tend to prefer tools that can be used nicely by the non criminally insane (the merely insane probably) programmers to do nifty things, than those designed for damage limitation. Perhaps I am an incurable optimist.