[M3devel] 64bit INTEGERs, WIDECHAR: language specified or configuration/target dependent?
Rodney M. Bates
rodney_bates at lcwb.coop
Thu May 28 01:45:02 CEST 2015
On 05/27/2015 11:37 AM, mika at async.caltech.edu wrote:
> Elmar Stellnberger writes:
> ...
>> I would have loved it to make INTEGER =3D BITS 32 FOR INTEGER and to =
>> allow
>> BITS 64 for INTEGER at the same time. However the way we have already =
>> gone is
>> to make LONGINT an own type with an own suffix like floats (the 'l' =
>> suffix). More
>> strictly typed and not so bad either.=
>
> Ah yes, LONGINT.
>
> I remain strongly opposed to that. I think it was a big mistake, it
> runs completely counter to Modula-3 design philosophy. INTEGERs are
> integers are integers are integers... fm: Command not found.
>
> Mika
>
The purpose of LONGINT is, cases where the program won't work with only
32-bit range, but you want the most efficient arithmetic possible on either
a 32-bit or a 64-bit machine, without recoding. The compiler will
generate either one-word machine arithmetic if the target has it,
or two-word, if not.
I suffered through this during the 16/32-bit transition, in Pascal
and Modula-2. I had to write source-coded 2-word arithmetic, which
would have been OK, if the entire universe didn't' have and never would
have 32-bit machines. Instead, it unnecessarily wasted storage and
computation when compiled on a 32-bit machine. The source code
differences for best efficiency on either were a huge pain.
--
Rodney Bates
rodney.m.bates at acm.org
More information about the M3devel
mailing list