Newsgroups: comp.lang.python,comp.lang.tcl,comp.lang.scheme,comp.lang.misc,comp.lang.perl
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!udel!gatech!howland.reston.ans.net!agate!overload.lbl.gov!lll-winken.llnl.gov!enews.sgi.com!wdl1!wdl1!mab
From: mab@wdl1.wdl.loral.com (Mark A Biggar)
Subject: Re: Comparing syntaxes  (Re: What language would you use?)
Message-ID: <1994Nov8.151744.18300@wdl.loral.com>
Sender: news@wdl.loral.com
Organization: Loral Western Development Labs
References: <39iol8$2rq@csnews.cs.Colorado.EDU> <JDONHAM.94Nov7130523@hadron.us.oracle.com> <39mq9a$930@csnews.cs.Colorado.EDU>
Date: Tue, 8 Nov 1994 15:17:44 GMT
Lines: 36
Xref: glinda.oz.cs.cmu.edu comp.lang.python:2485 comp.lang.tcl:21536 comp.lang.scheme:11052 comp.lang.misc:18900 comp.lang.perl:38300

In article <39mq9a$930@csnews.cs.Colorado.EDU> tchrist@mox.perl.com (Tom Christiansen) writes:
>[ This article cc'd to cited author via email, and also posted
>  to the newsgroups listed above. ]
>:-> In comp.lang.perl, jdonham@hadron.us.oracle.com (Jake Donham) writes:
>:    Tom> Of course, in perl, the x, i, and j variables might all
>:    Tom> actually be tied to secret little package functions, making
>:    Tom> it easier to implement
>:    Tom>     print $his_host{"load average"};
>:    Tom> in a straightforward way:the his_host hash table gets bound
>:    Tom> to some clever little rpc fetcher or SNMP thing.
>:Yikes. Doesn't it make you nervous that simply by referencing a
>:variable all manner of unknown things could happen? Computationally
>:expensive procedures could be called, global variables could be
>:modified--this is not going to help debugging.
>:We're used to procedures not being referentially transparent (and a
>:lot of people aren't happy with that) but referentially opaque
>:variables are an accident waiting to happen. This (mis-)feature has a
>:lot of "gee-whiz" value but the potential for misuse is large.
>Huh?  It's phenomenally powerful.  I suppose that you dislike the fact 
>that you can map a hash table in memory to one on disk (via dbm)?
>That's just one example of its use.  The SNMP example hasn't to my 
>knowledge been implemented, but it could be.
>You could have something like:
>    $current_nice_value = -20;
>automatically do the right thing by making the setpriority system call on 
>systems that support it.
[further examples deleted]

The use of tie in perl is really no different that the ability to user define
member slot accessors in CLOS.  The default accessors functions just read/write
the object members, but you can redefine them to do any arbitrary functionality.

--
Mark Biggar
mab@wdl.loral.com

