From: Richard Jones <rich@annexia.org>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Primitive sizes
Date: Fri, 1 Oct 2004 10:36:44 +0100 [thread overview]
Message-ID: <20041001093644.GA9436@annexia.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0409301551020.5809-100000@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]
On Thu, Sep 30, 2004 at 03:54:33PM -0500, Brian Hurt wrote:
> I don't know what Java's calling convention is. My advice:
>
> > Type Bits
> > ----- ----
> > byte - 8
> > short - 16
> > char - 16
> > boolean - 8
>
> The above I'd just promote to ints for Ocaml, and truncate as necessary.
We have a similar problem with the ocamldbi Dbi interface. It maps
SQL int4 and serial types (ie. full 32 bit signed ints) to OCaml int.
The reason is convenience. It's MUCH more convenient to deal with
OCaml int than boxed Int32.
However if anyone has a database with more than about 1 billion rows
in it, then they may find they have a problem ...
Rich.
--
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
"One serious obstacle to the adoption of good programming languages is
the notion that everything has to be sacrificed for speed. In computer
languages as in life, speed kills." -- Mike Vanier
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2004-10-01 9:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-29 6:43 Jonathan Bryant
2004-09-29 15:02 ` Brian Hurt
2004-09-30 6:16 ` Jonathan Bryant
2004-09-30 20:54 ` Brian Hurt
2004-10-01 9:36 ` Richard Jones [this message]
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=20041001093644.GA9436@annexia.org \
--to=rich@annexia.org \
--cc=caml-list@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