[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why would anyone want opacity?
From: "Guillermo J. Rozas" <gjr@martigny.ai.mit.edu>
Subject: Re: Why would anyone want opacity?
Date: Mon, 13 May 96 15:10:16 -0400
> | Date: Mon, 13 May 1996 15:02:07 -0400
> | From: Matthias Blume <blume@CS.Princeton.EDU>
>
> | Of course there are times when one needs such things. My objection is
> | to making generic numbers the *default*. Most of the numbers in my
> | programs are small integers, and I expect this to be true even in
> | heavy generic math packages. We can safely assume that loop indices,
> | array subscripts, etc., are not quaternions most of the time. And
> | most of the numbers (at least in my programs) are loop indices of some
> | sort.
>
> Why not make it the default? I can only imagine efficiency being the
> issue, and there are ways to overcome that. In addition, having to
> detect overflow causes the same level of inefficiency.
Detecting overflow doesn't cause any overhead on many machines,
because they have integer instructions that trap on overflow.
> | If you really need to use a generic Number type it would be better to
> | define a signature for the corresponding algebraic structure (pun
> | intended) and abstract your code over this structure.
>
> Right, and then I would have had to modify the assembler instead of
> using it verbatim. Which version is saving me work?
My version saves *you* work. Your version saves the compiler (or the
linker) some work.
> | Moreover, the new standard basis for ML defined the structure Int32,
> | which provides 32-bit integers for those who need them.
>
> So they've made it even more concrete instead of abstract. It seems
> like the wrong thing.
It is what users are asking for. They are writing OS-level code in ML
(see FoxNet). Is anybody writing OS-level code in R4RS Scheme?
-Matthias