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
[Caml-list] date - waiting for 64-bit (was: Gripes with array)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-09-09 (13:44)
From: Basile Starynkevitch [local] <basile.starynkevitch@i...>
Subject: Re: [Caml-list] date - waiting for 64-bit
On Thu, Sep 09, 2004 at 03:20:38PM +0200, Samuel Lelievre wrote:
> Basile Starynkevitch wrote:
> >I suggest to switch to Ocaml (even on a 32 bits machine) ...
> Do you mean that the integers of type int are not mod 2^31 in Ocaml?

You have four integer types in Ocaml: int (on 31 bits), Int32.t (on 32
bits) and Int64.t (on 64 bits) and NativeInt.t (32 bits on 32 bits
machine, 64 bits on 64 bits machines). The details and tradeoffs are

But the current date & time, as returned by Unix.time, is a *floating
point* number, and Unix.gmtime take a floating point number as an
arguments (so there won't be any Y2K or 2038 problem because of
Ocaml's fault in the foreseeable future, long after we are all back to
dust - not even bare bones). Floating point are enough for time
representation on both 32 and 64 bits machine.

> That's certainly an argument to make me make my mind to switch,
> which I was postponing forever, having failed to translate my
> simple programs to Ocaml (I have to confess I did not try hard).

I am suggesting to try harder. Using Ocaml is IMHO much better than
using CamlLight. OReilly has a very good french book on Ocaml

Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr
Project cristal.inria.fr - temporarily.

http://cristal.inria.fr/~starynke --- all opinions are only mine 

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners