Browse thread
Estimating the size of the ocaml community
-
Yaron Minsky
-
Christopher A. Watford
-
Frédéric_Gava
-
skaller
-
Erik de Castro Lopo
- Olivier_Pérès
-
Thomas Fischbacher
-
Frédéric_Gava
-
Thomas Fischbacher
- Paul Snively
- josh
- Richard Jones
-
Jon Harrop
-
Michael Walter
-
Jon Harrop
- Damien Doligez
- Thomas Fischbacher
- Michael Walter
-
Radu Grigore
- Gerd Stolpmann
- Jon
-
Jon Harrop
- Thomas Fischbacher
- Richard Jones
-
Michael Walter
- Ville-Pertti Keinonen
-
Oliver Bandel
-
Thomas Fischbacher
-
Oliver Bandel
-
Richard Jones
- Basile STARYNKEVITCH
- Oliver Bandel
- skaller
-
Richard Jones
-
Oliver Bandel
-
Thomas Fischbacher
- Basile STARYNKEVITCH
-
Thomas Fischbacher
- ronniec95@l...
- skaller
- chris.danx
-
Frédéric_Gava
-
Erik de Castro Lopo
- sejourne_kevin
- Stefano Zacchiroli
-
skaller
-
Frédéric_Gava
- Kenneth Knowles
- Michael Jeffrey Tucker
- Richard Jones
- Nicolas Cannasse
- Evan Martin
- Eric Stokes
- chris.danx
- Sylvain LE GALL
- sejourne_kevin
- Sven Luther
- Johann Spies
-
Christopher A. Watford
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-02-05 (19:26) |
From: | Oliver Bandel <oliver@f...> |
Subject: | Re: Why can't types and exceptions be nested (was: Re: [Caml-list] Estimating the size of the ocaml community) |
On Sat, Feb 05, 2005 at 04:37:32PM +0000, Richard Jones wrote: > On Sat, Feb 05, 2005 at 02:14:18PM +0100, Oliver Bandel wrote: > > ...well.... > > > > type sometimes_t = Integer of int | One_symbol | Another_symbol > > Another annoyance of OCaml is that 'type' definitions (and exception > defns for that matter) can't be nested. I'm a big big fan of nested > functions, and sometimes I want to return a type which is only used > briefly between two nested functions. Instead the type has to go > right at the start of the outer function, which may be many pages of > code away. This reduces readability. What does "nested types" mean? Can you explain, what this is? How would a nested OCaml-type looks like, if the compiler would allow it? Example please. Ciao, Oliver