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


At 23:07 04/04/2000 +0200, Mikael Djurfeldt wrote:
>Marius Vollmer <mvo@zagadka.ping.de> writes:
>> 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.

After using Goops for a few months, I must say that I do not agree.  This
is really too much typing for accessing a slot in an object.  The point is
not (only) that it's too long to *type*, but that it takes too much time to
*read* it.  In all languages I know (including human languages), the more
common words and sentences are the shortest, and syntactic sugar makes them
visually different, and it is a good thing.  I really think that
   
   obj->x++ 

is more readable than 

   (set! (x obj) (1+ (x obj)))

It really bothers me when I re-read the DOM code I'm trying (sometimes) to
write.

-- 
Thierry Bézecourt
thbz@worldnet.fr


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