From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: [Not important] the “not null” notation in Ada 2005
Date: Fri, 25 Mar 2011 13:13:45 -0400
Date: 2011-03-25T13:13:45-04:00 [thread overview]
Message-ID: <wcc4o6r5diu.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: op.vswrd7k0ule2fv@index.ici
"Yannick Duch�ne (Hibou57)" <yannick_duchene@yahoo.fr> writes:
> Thanks Bob; but I know SML, not OCaml. Do I really have to learn all of
> OCaml to get an idea or can you give some tracks ?
The two languages are pretty similar, actually.
If you want a thing, you declare type thing.
If you want a thing-or-null you declare "Thing | Null".
Or maybe something like "List = Pair | Empty_List".
There's a Maybe type -- Maybe(T) means "a T or nothing".
You don't get any sort of null-like value unless you ask for it,
and you don't have to call it "null", and you can have several
such special values.
- Bob
next prev parent reply other threads:[~2011-03-25 17:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 15:45 [Not important] the “not null” notation in Ada 2005 Yannick Duchêne (Hibou57)
2011-03-25 15:51 ` Robert A Duff
2011-03-25 16:43 ` Yannick Duchêne (Hibou57)
2011-03-25 17:13 ` Robert A Duff [this message]
2011-03-25 17:29 ` Yannick Duchêne (Hibou57)
2011-03-26 7:02 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox