This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Syntatic sugar and identifier permissivity
- To: Marius Vollmer <mvo at zagadka dot ping dot de>
- Subject: Re: Syntatic sugar and identifier permissivity
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 04 Apr 2000 23:07:51 +0200
- Cc: Lalo Martins <lalo at hackandroll dot org>, guile at sourceware dot cygnus dot com
- Cc: djurfeldt at nada dot kth dot se
- References: <20000403213207.E4496@hackandroll.org> <874s9hg1w3.fsf@zagadka.ping.de>
Marius Vollmer <mvo@zagadka.ping.de> writes:
> I do agree, however, that convenience is an important thing. A while
> ago, I boasted about how happy I am to use long names for my accessors
> because that way I could keep the interfaces of my objects clean and
> separate. I have used GOOPS more in the meantime, and those long
> names are getting more and more inconvenient.
>
> Nevertheless, I think I can get enough convenience from
> with-accessors. I use a macro to generate long accessor names, and a
> macro can help me avoid having to type them in everytime.
>
> I don't like that a simple C statement like
>
> obj->x++;
>
> turns into
>
> (set! (gto-canvas-x obj) (1+ (gto-canvas-x obj)))
Well, after using GOOPS in my projects since this summer, my
experiences are rather good. :) I write
(set! (x obj) (1+ (x obj)))
and have not experienced difficulties from the fact that (x ...) may
mean other slots in other objects.
There is also an upcoming suggested "solution" to the GF merging
problem. So I have good hopes that the final result will be quite
convenient (but, as already said, I find it quite convenient as it
is).