C needs BCD (ANSI People: Please Lis
Geoff Kuenning
geoff at desint.UUCP
Thu Nov 8 14:04:19 AEST 1984
In article <869 at ihuxn.UUCP> Rich Strebendt writes:
>> PL/I has already been invented. It has 11 million different flavors
>> of arithmetic. Why didn't you use it? Too slow? Not available?
>> Think about why that might be.
>
>Why does the author of this question think that might be? I would be
>willing to lay odds that he is dead wrong!!! As to why I think so,
>continue to my comments below:
[A discussion of the well-known fact that 70% of all software is written in
COBOL follows].
>I will agree that PL/I suffered from trying to be all things to all
>people and ended up doing none of them superlatively well, but that was
>not why it did not catch on in the business DP community.
Harumph. Certainly conservatism had something to do with it. But PL/I
was, and is, an amazing pig compared to COBOL, which is hardly efficient.
When you are buying from IBM, that translates into millions of dollars of
extra hardware.
>Sooooo, if we have to decide between FP and BCD, the smart money would
>be betting on BCD. FP is of academic interest!
Harumph again. BCD is necessary for the business community. C, in case you
hadn't noticed, is not targeted at business programming. Just because 70%
of all software is written for business (more accurately, 70% of all lines
of code--COBOL is a pretty high-line-count language) doesn't mean a
language intended for systems programming should implement BCD! The
interesting question is how often you need each data type, and what the
expense is of doing it in software. Systems programs and utilities
occasionally need extended precision and range, but they do not have
problems with binary/decimal conversion. BCD exists *not* because it is
the only way to get extended precision, but because a business program that
did decimal/binary/decimal conversion during its processing would be a lot
slower. This is not true of systems software. Software floating point, on
the other hand, is *excruciatingly* slow.
--
Geoff Kuenning
First Systems Corporation
...!ihnp4!trwrb!desint!geoff
More information about the Comp.lang.c
mailing list