English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Type from local module would escape its scope?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-07-03 (17:30)
From: brogoff <brogoff@s...>
Subject: Petty complaint (Was Re: [Caml-list] Type from local module would escape its )scope?
On Mon, 3 Jul 2006, Virgile Prevosto wrote:
> IIRC arguments can not have a generalized type of the form
> "forall 'a, 'a -> unit", but methods and record fields support such
> types: for instance, you can have:

It makes me wonder, if OCaml is to be a functional language, why
functions are second class citizens of the language with regards
to typing? By various encodings you can get this higher rank
polymorphism, it's been there for years, but we can't write the function
directly. Is it because we'd have to write it's type?

-- Brian