From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA19705; Fri, 1 Oct 2004 11:36:46 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA18431 for ; Fri, 1 Oct 2004 11:36:45 +0200 (MET DST) Received: from annexia.force9.co.uk (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i919ajum012120 for ; Fri, 1 Oct 2004 11:36:45 +0200 Received: from rich by annexia.force9.co.uk with local (Exim 3.36 #1 (Debian)) id 1CDJqG-0002TA-00 for ; Fri, 01 Oct 2004 10:36:44 +0100 Date: Fri, 1 Oct 2004 10:36:44 +0100 Cc: caml-list@inria.fr Subject: Re: [Caml-list] Primitive sizes Message-ID: <20041001093644.GA9436@annexia.org> References: <1096525010.29339.5.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i From: Richard Jones X-Miltered: at nez-perce with ID 415D252D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 java's:01 char:01 truncate:01 dbi:99 obstacle:01 vanier:01 ltd:98 ints:01 ints:01 ocaml:01 ocaml:01 byte:01 int:01 X-Attachments: type="application/pgp-signature" name="signature.asc" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: >=20 > > Type Bits > > ----- ---- > > byte - 8 > > short - 16 > > char - 16 > > boolean - 8 >=20 > 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. --=20 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 --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFBXSUs4le1M6q9pzoRAgOBAKDi9yQ3mdjX0e2o+7n86rmKPatzJgCeJXB1 0qX4r4HNStK35UjHcmxipxI= =rSL5 -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7-- ------------------- 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