Newsgroups: comp.lang.perl,comp.lang.tcl,comp.lang.python,comp.lang.scheme,comp.lang.misc,co
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!pipex!uunet!sytex!smcl
From: smcl@sytex.com (Scott McLoughlin)
Subject: Re: "magic"  instance variables (was: Comparing syntaxes (was: What 
Message-ID: <XX3gVc1w165w@sytex.com>
Sender: bbs@sytex.com
Organization: Sytex Access Ltd.
References: <Pine.A32.3.90.941108012326.18486B-100000@elvis.med.Virginia.EDU>
Date: Tue, 8 Nov 1994 12:52:20 GMT
Lines: 55
Xref: glinda.oz.cs.cmu.edu comp.lang.perl:38291 comp.lang.tcl:21527 comp.lang.python:2479 comp.lang.scheme:11051 comp.lang.misc:18898

"Steven D. Majewski" <sdm7g@Virginia.EDU> writes:

> This appears to be a OO vs a procedural oriented POV difference.
> From the OO POV, there is nothing at all wrong with abstracting
> OUT the presence or absence of procedure calls to implement
> side effects. Assignment is just a change of state. If a prodecure
> call is required to implement that change of state, then that is
> just an implementation detail. 
> 

Howdy,
        Hmmmm.... For lack of a better phrase, this is a 
"bunch of hooey", IMHO.  There is no "abstracting out the
presence or absence of procedure calls" -- they are
either there or they aren't there.
        What you're talking about is stricly a syntactical
perversion that _obscures_ the semantics of variable update.
        It reminds me of dummies who think that anything
in a standard library is "built in" and therefore faster than
anything they could write themselves; all you get is a sort
of "feel good" quotient since "g := foo" _looks_ faster than
"(g foo)" or "g(foo)".
        And of course, you can't _tell_ what the hell is
going on anymore.  What looks like constant time access to
a chunk of memory ends up being some ridiculous file/io
procedure, or side effects causing bugs can't easily be
chased down, etc. etc.
        As for Smalltalk's syntax, which presumably is the
source of these nonsensical "OO" vs. procedural "perspective"
ramblings -- Smalltalk's syntax is remarkably clear and
mirror's its semantics quite nicely. Updating a "slot" in an
object _is_ a procedure call when you want to achieve this
from outside the scope of the object's slots. Hence:

        x foo: 9

Within the scope of the instance variables (slots, whatever)
however, such as in the method definition of a class, we 
have the following syntax:

        | local_1 local_2 |
        local_1 := 2.
        foo := 8.

Variable update (locals and instance variables and class variables)
when the variables are in scope is "assignment" or "update" semantics
with a nice old fashioned "update" syntax. So _there's_ your 
canonical "OO" perspective.
        Thank goodness GEL will be based on a real language --
Scheme. Let sanity prevail.

=============================================
Scott McLoughlin
Conscious Computing
=============================================
