Re: Question about O'Caml 3

From: Thorsten Ohl (ohl@hep.tu-darmstadt.de)
Date: Fri Apr 28 2000 - 12:00:11 MET DST

  • Next message: John Max Skaller: "O'Caml 3 doco"

    Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp> writes:

    > If you want to be on the safe side, better not to use lowercase
    > variants, since they could be removed in the future. Also they are
    > probably not so nice if you are really intending to use them as sum
    > types, which are usually identified by their uppecase first letter.
    > On the other hand, I have a personal liking for lowercase variants,
    > at least when they have only an abstract meaning (not really used as
    > values, but rather as types, and types are lowercase).

    When ocaml-2.99 came out I tried to pick up idioms with polymorphic
    variants from the lablgtk sources and I was very confused by this
    ambiguity.

    As you said, the lowercase polymorphic variants appeared to be used
    more like types and the uppercase polymorphic variants appeared to be
    usd more like sum types. However, the lowercase polymorphic variants
    were not mentioned anywhere ...

    >From the compiler sources, I then found out that there is no
    difference and assumed (apparently correctly) that they are there for
    olabl compatibility.

    I'm not complaining about lack of documentation, but I want to point
    out that such ambiguities make it hard for novices (it's my fault,
    that I hadn't studied olabl before, of course) to pick up proper
    idioms in a programming language.

    Cheers,
    -Thorsten

    -- 
    Thorsten Ohl, Physics Department, TU Darmstadt -- ohl@hep.tu-darmstadt.de
    http://heplix.ikp.physik.tu-darmstadt.de/~ohl/ [<=== PGP public key here]
    



    This archive was generated by hypermail 2b29 : Fri Apr 28 2000 - 12:23:39 MET DST