From: james woodyatt <jhw@wetware.com>
To: Xavier Leroy <xavier.leroy@inria.fr>
Cc: The Trade <caml-list@inria.fr>
Subject: [Caml-list] integer types and their literals
Date: Wed, 6 Feb 2002 13:02:52 -0800 [thread overview]
Message-ID: <E2AF7D00-1B44-11D6-A528-000502DB38F5@wetware.com> (raw)
In-Reply-To: <20020206190151.A9371@pauillac.inria.fr>
On Wednesday, February 6, 2002, at 10:01 , Xavier Leroy wrote:
> [...] We have three "big integer" types:
> int32, nativeint and int64. A C-style syntax would be 12345L for
> int32 and 123456789LL for int64; what about nativeint? 12345N ?
> Anything nicer?
Given my heritage as a Perl and C++ hacker, my opinion may be next to
worthless here, so I will simply observe that this would be consistent
with other choices already made, e.g. the syntax for representing
integer literals in hexadecimal and octal.
I think what you have proposed here would do very well.
While we're on the subject:
It would be nice to have conversion functions that raise exceptions to
indicate overflow, i.e. converting 0x100000000LL to int32 could raise an
exception of int32, where the value is 0L. Do you think such functions
belong in the standard library, or should I expect to bolt them on later?
Also, I deeply long for unsigned integer types. I'd be happy if the
type system included them, and required explicit conversion between
signed and unsigned integer values. Is there a reason Ocaml doesn't
have unsigned integer types?
--
j h woodyatt <jhw@wetware.com>
"...the antidote to misinformation is more information, not less."
--vinton cerf
-------------------
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
next prev parent reply other threads:[~2002-02-06 21:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-04 23:06 [Caml-list] Suggestion for Int32.rotate Berke Durak
2002-02-06 18:01 ` Xavier Leroy
2002-02-06 20:08 ` Daniel de Rauglaudre
2002-02-06 20:43 ` Frederic van der Plancke
2002-02-06 22:40 ` Chris Hecker
2002-02-07 1:07 ` Gerd Stolpmann
2002-02-07 3:05 ` Brian Rogoff
2002-02-07 3:25 ` Eric C. Cooper
2002-02-07 13:49 ` Thorsten Ohl
2002-02-07 13:55 ` Remi VANICAT
2002-02-07 16:32 ` [Caml-list] More syntax: _ in numbers, backquote infix op's Christian Lindig
2002-02-06 21:02 ` james woodyatt [this message]
2002-02-06 21:36 ` [Caml-list] Suggestion for Int32.rotate Berke Durak
2002-02-07 1:15 ` Gerd Stolpmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E2AF7D00-1B44-11D6-A528-000502DB38F5@wetware.com \
--to=jhw@wetware.com \
--cc=caml-list@inria.fr \
--cc=xavier.leroy@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).