Re: Semantic of label: The best (only ?) solution to merge both mode

From: Christophe Raffalli (Christophe.Raffalli@univ-savoie.fr)
Date: Sun Apr 02 2000 - 21:24:59 MET DST

  • Next message: Ian Zimmerman: "Re: Emacs indentation fo OCaml"

    > Now, the commuting label mode is just for those who are ready
    > to change a bit their habits.
    > And since it is my personal creation (with others), I will just
    > refrain from explaining why it is so wonderfully clean theoretically.

    Ok keep two modes if you want ...

    Let's only talk about the modern mode !

    I wanted to really use commuting labels, I was ready to change my habit,
    but I found them to restrictive. I find my proposal, which is just to
    change a bit the semantics of function application (and nothing else) on
    non-labelled arguments quite nice and useful (no need to always remember
    all the label names if you prefer to remember the order of the
    arguments).

    As my proposal only cost to change about 20 lines why not have an option
    to the modern mode to let people try it for real and see what they think
    ?

    About the "so wonderfully clean theoretically" .. it is not so clear:
    look at this example:

    > lama-d134:~> ocaml -modern
    > Objective Caml version 2.99 (99/12/08)
    >
    > # let h f = f x:1 y:2;;
    > val h : (x:int -> y:int -> 'a) -> 'a = <fun>
    > # let h f = f y:1 x:2;;
    > val h : (y:int -> x:int -> 'a) -> 'a =
    > <fun>
    >
    > The infered type depends on the way you write thing while one could think
    > they are equivalent (the labels commute in modern mode, don't they ?)
     
    I could live with this kind of problem ... but in the current version
    labels are more painful than useful in modern mode (this is my opinion)
    !

    -- 
    Christophe Raffalli
    Université de Savoie
    Batiment Le Chablais, bureau 21
    73376 Le Bourget-du-Lac Cedex
    

    tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI



    This archive was generated by hypermail 2b29 : Sun Apr 02 2000 - 23:51:23 MET DST