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] Suggestion for Int32.rotate
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-02-07 (03:26)
From: Eric C. Cooper <ecc@c...>
Subject: Re: [Caml-list] Suggestion for Int32.rotate
On Thu, Feb 07, 2002 at 02:07:35AM +0100, Gerd Stolpmann wrote:
> Why not allow "_" in integer literals, so one can write
> 12345_i32, 123456789_i64, 123_456_789_i64, 123456789_nat,
> 123456789_big (for bigints). I think this kind of suffix is easier
> to remember than a single letter.

I like Gerd's suggestion.  Two others:

- Please support both signed and unsigned (or "int" and "card")
  literals of each width, perhaps using _s32 and _u32 etc.
  We would also need the unsigned analogs of Int32 and Int64 modules.

- Slightly off-topic: add hexadecimal character literals '\0xNN' At
  least once a year, I assume that '\010' should be *octal* 10, like
  in C.  Since you can't fix that without breaking old code, it would
  be nice to have the option of using hex char literals in new code.

Of course the meta-solution would be for Daniel to give us an
extensible lexer. :-)

Eric C. Cooper          e c c @ c m u . e d u
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr