Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Why can't I use constructors as functions?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Marcin 'Qrczak' Kowalczyk <qrczak@k...>
Subject: Re: [Caml-list] Why can't I use constructors as functions?
Fri, 3 Aug 2001 12:00:17 +0200, Markus Mottl <> pisze:

> The language would seem much more regular to me if functions and
> constructors were treated in a similar way.  Would this be too big a
> change to the core language?

It's a change to the syntax, not to the core language. Revised syntax
uses curried constructors, with declaration of a constructor looking
like this:
   ... | C of int and string | ...

 __("<  Marcin Kowalczyk *
  ^^                      SYGNATURA ZASTĘPCZA

Bug reports:  FAQ:
To unsubscribe, mail  Archives: