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


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


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