This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Syntatic sugar and identifier permissivity
- To: Michael Vanier <mvanier at bbb dot caltech dot edu>
- Subject: Re: Syntatic sugar and identifier permissivity
- From: Andrew Ho <andrew at tellme dot com>
- Date: Mon, 3 Apr 2000 22:12:42 -0700 (PDT)
- cc: Guile Mailing List <guile at sourceware dot cygnus dot com>
Hello,
MV>I like this. I'd still prefer `foo.bar' but this violates the lexical
MV>conventions of scheme (which I think are looser than they need to be).
MV>Dylan had (has?) this even for generic functions; you could do:
MV>
MV> do(foo, arg1, arg2)
MV>
MV>or
MV>
MV> foo.do(arg1, arg2)
MV>
MV>Whether this introduces more confusion than it prevents is an open
MV>question. Having `foo,bar' only apply for accessors seems reasonably
MV>consistent, though. It seems to me it wouldn't be a huge job to write a
MV>reader that supported this syntax, either.
For another comparison, this "alternate syntax to indicate that the first
argument is an object" is also used in Perl 5. For that example,
method($object, $arg1, $arg2);
is written in OO-style like this:
$object->method($arg1, $arg2);
This sort of notation does indeed make OO-programming much clearer.
Humbly,
Andrew
----------------------------------------------------------------------
Andrew Ho http://www.tellme.com/ andrew@tellme.com
Engineer info@tellme.com Voice 650-930-9062
Tellme Networks, Inc. Fax 650-930-9101
----------------------------------------------------------------------