Re: to have labels or not

From: Damien Doligez (Damien.Doligez@inria.fr)
Date: Sat Mar 25 2000 - 15:46:24 MET

  • Next message: Damien Doligez: "Re: variables in 'let rec'"

    >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



    This archive was generated by hypermail 2b29 : Mon Mar 27 2000 - 19:22:48 MET DST