Loading ...
Sorry, an error occurred while loading the content.

2782Re: "ocaml_beginners"::[] Re: 'ocaml_beginners'::[] Execution semantics

Expand Messages
  • Remi Vanicat
    Nov 11, 2004
    • 0 Attachment
      On Tue, 9 Nov 2004 19:57:38 +0000, Alwyn <dt015a1979@...> wrote:

      > I have another question: In Standard ML and Haskell, constructors can
      > be used as functions. Why is this not the case in CAML?

      Well, in the 3 said language, construcor are mainly tag that are put
      in the header of the object, and type declaration for type safety.
      Then one can decide to define a function to build such a value. But it
      is not automatic. So ocaml choose to not do it, while the two other
      said language do. It is a design decision, there is no real good
      reason against it (At least in my knowledge)
    • Show all 26 messages in this topic