"catch-all" labels?

From: Markus Mottl (mottl@miss.wu-wien.ac.at)
Date: Sun Feb 13 2000 - 18:42:24 MET

  • Next message: Jacques Garrigue: "Re: Typing problem"


    in some function applications labels seem to be somewhat more clumsy than
    their unlabeled version, e.g.:

      # List.fold_left fun:(+) acc:0 [1;2;3];;
      This expression has type int -> int -> int but is here used with type
        acc:'a -> 'b -> 'a

    Would it make sense to introduce something like "catch-all" labels, which
    might be useful in functions like "+" where the order of parameters does
    not matter, maybe:

      let (+) _:x _:y = x + y

    which would match any label? (Only curious...)

    Markus Mottl

    Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl

    This archive was generated by hypermail 2b29 : Sun Feb 13 2000 - 22:20:59 MET