This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Syntatic sugar and identifier permissivity


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
----------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]