Newsgroups: rec.arts.int-fiction
Path: news.duke.edu!newsgate.duke.edu!zombie.ncsc.mil!alnews.ncsc.mil!feed.news.qwest.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newspeer.radix.net!uunet!ash.uu.net!world!not-for-mail
From: buzzard@TheWorld.com (Sean T Barrett)
Subject: Re: [TADS] A subtle incompatibility between 2.2 and 2.5.5
Sender: news@world.std.com (Mr Usenet Himself)
Message-ID: <Gu1uIx.34C@world.std.com>
Date: Thu, 4 Apr 2002 15:18:32 GMT
References: <a7sdvj$2oa$1@news.lth.se> <etLo8.36$Iu3.154@news.oracle.com> <55581856.0204020811.6c5b44bb@posting.google.com> <665b644a.0204030030.7e8d5215@posting.google.com>
NNTP-Posting-Host: shell01.theworld.com
Organization: The World Public Access UNIX, Brookline, MA
X-Newsreader: trn 4.0-test72 (19 April 1999)
Lines: 38
Xref: news.duke.edu rec.arts.int-fiction:102596

Kevin Forchione <kevin@lysseus.com> wrote:
>    local found = &myProperty;
>    obj.(found);
>found, in this case is a reference to a property pointer. If the author codes:
>    obj.found;

The thing about this is that it's such an inconsistent
use of () compared to the other two uses. It makes sense
in the sense that if it were somehow meaningful to say
obj.5, then if you wanted to say obj.(2+3) you'd need
parentheses; but it really doesn't make much sense, I sense.
It sounds suspiciously like a hack, and will read that
way in the programming manual.

In my old mud system Sludge, the *literal constant*
"$foo" served the same role as Tads' operator-&-followed-
by-an-identifier--"&(foo+bar)" isn't meaningful anyway--
and so you could easily just say

    local found = $myProperty;

    x = obj.found;
    y = obj.$found;

and get the two different semantics. I imagine the same
technique would work for versions of Tads that default the
lexical scoping of 'found' in the same way, unless the
behavior of '&' is not what I think it is.

Of course, it still has the behavior that you have some
code that says "foo.bar" and you add a local variable "bar"
and break the code, but this is basically the same bug you
already have with no static typing and run-time typing.
At least this has the same adding-local-changes-semantics
behavior as you get when foo is both an instance variable
and a local. (But maybe Tads3 worns about that case, I dunno.)

SeanB
