[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why would anyone want opacity?

On Fri, 10 May 1996 18:15:44 -0400, Matthias Blume <blume@CS.Princeton.EDU> said:

> But then: why generic arithmetic?  I know, it's kinda cute.  But is
> it worth it?  Don't we know most of the time in advance that a given
> variable will always hold a small integer?  Or a real?  Is the
> trouble of automatically injecting into and projecting from a
> universal number type (with the associated run-time checks) really
> worth it?

For me, lots of time, it is.  I'm a mathematician, and these days most
of the time that I'm programming I'm implementing algorithms that
would work largely or entirely without change over much larger classes
of "numbers" than rationals or reals or whatever.  And even when I'm
dealing with just rationals or integers, having arbitrary precision
arithmetic is absolutely essential.  And when I say "would work" in
the above, I'm not talking about some sort of abstract possibility; I
mean that it happens all the time that I wish that I could run some of
my code in a more generic number system, that I didn't have to go
running to Maple (which I can't stand) every time that I want to allow
the possibility of dealing with polynomials, say, rather than rational

david carlton

       I just forgot my whole philosophy of life!!!