This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Syntatic sugar and identifier permissivity
- To: Thierry Bezecourt <thbz at worldnet dot fr>
- Subject: Re: Syntatic sugar and identifier permissivity
- From: Dirk Herrmann <dirk at ida dot ing dot tu-bs dot de>
- Date: Wed, 5 Apr 2000 10:10:49 +0200 (MEST)
- cc: guile at sourceware dot cygnus dot com
On Wed, 5 Apr 2000, Thierry Bezecourt wrote:
> visually different, and it is a good thing. I really think that
>
> obj->x++
>
> is more readable than
>
> (set! (x obj) (1+ (x obj)))
I do agree that the first is easier to read. The problem in this case,
however, is not goops, but rather the lack of an inc! macro:
(set! obj.x (1+ obj.x))
is still less comfortable to read than:
(inc! (x obj))
Note that in the first example the accessor syntax was changed, while in
the second example an inc! macro was assumed.
Thanks to the modified set!, such an inc! macro should be easy to write.
Best regards
Dirk Herrmann