Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: to have labels or not
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <Damien.Doligez@i...>
Subject: Re: to have labels or not
>From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>

>The only weakness of this approach is if you copy some code from a
>file in classic mode to one in commuting label mode (or reverse).
>Then you have to add/remove labels by hand.  But then this is also a
>way to understand the code better :-)

I know that Jacques is perfectly aware of it, but I think it's good
to stress this point:

Even the above is not entirely true.  If you suspect you'll have to
change modes, you can write code that works in both modes, simply by
giving all labels in the right order in every function
application.  It's even reasonable to write all your code in this
fashion.

And if you didn't do it in advance: to go from classic to commuting
label mode, add the labels.  To go from commuting label to classic
mode, don't remove the labels but put the function arguments back in
the right order.  In either case, the resulting code works in both
modes and you'll never need to change it again.

-- Damien