On Wed, Aug 25, 2004 at 03:21:20PM -0400, Mathieu Bouchard wrote:
On Wed, 25 Aug 2004, Miller Puckette wrote:
I'm not sure if any code is left now using integers that have to be as big as pointers. The "t_int" typedef shows up a lot though, and having only a 32-bit machine at the moment, I'm nervous about getting rid of them all. I'd also be nervous just calling them "long" - there's no guarantee that can hold a pointer either.
From the FAQ :
Ruby is developed under Linux, and is written in fairly straightforward C. It runs under UNIX, DOS, Windows 95/98/NT/2000, Mac OS X, BeOS, Amiga, Acorn Risc OS, and OS/2.
May I add that Ruby is available for many, many CPUs, and still, ruby.h reads (version 1.9.0 cvs) :
#if SIZEOF_LONG != SIZEOF_VOIDP # error ---->> ruby requires sizeof(void*) == sizeof(long) to be compiled. <<---
#endif typedef unsigned long VALUE; typedef unsigned long ID;
is my argument convincing?
I find the argument "this technique is used in a large scale open source project so it must be good" quite flaccid myself. Who knows how compilers, hardware, etc. will change in the future? Don't you think it's better to keep it as portable as possible?
Chris. ------------------- chris@mccormick.cx http://mccormick.cx