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

Re: [MacPerl] Cobol replacement?



At 08:23 +1000 on 22/10/97, Mark Manning/Muniz Eng. wrote:
>I will have to bring the magazine to work in order to post
>the requirements presented.  But speaking generally they
>were (if I remember correctly):
>
>1. Accuracy (no rounding of numbers).

Well... either stick to integer maths or use strings to represent numbers.
As soon as you convert a number like 5.333... to binary, you lose
something, since the binary notation is only base 2.

The usual thing I've seen done in money/measuring situations is to multiply
all measurements by 100 or so (giving 2 decimal points accuracy), work and
store those numbers, then divide by 100 before presenting results to the
user (or perform fancy tricks with the formatting).

>2. Accuracy in reading files (sequential and random).

*scratches head*

Are there any languages out there that *aren't* accurate in reading files?
I'd love to know what the motive behind that requirement was. Perhaps
someone's thinking back to punched card days in which case the accuracy
comes from people not dropping the deck, and making sure the card reader is
maintained properly :-)

>3. Decent built in sort routine (no losing of records).

Does PERL have a built in sort? I'll have to play with it and see how it's
used... then I'll try losing some records.

>4. Easily used/read.  (ie: Understandable by the average businessman).

Well... seeing as most PERL code I've seen would win hands down in a C/C++
obfuscated code competition, I don't know about this requirement being met
except by the most diligent of programmers who never uses advanced
functions like the ternary '?' eg: "$x=($a>$b)?$a:$b;"

Most "average businessmen" I know would look at that statement and wonder
why code is so expensive :-)  That requirement #4 can't even be met by
Cobol, since most people I know who fit the category "the average
businessmen" (TAB) don't want to think more than they have to. IMHO, no
language should be understandable by "TAB" since otherwise TAB would start
*writing* code. I don't particularly want to have more work if it involves
cleaning up someone else's mess.

Windows 95: n. 32 bit extensions and a graphical shell for a 16 bit patch
to an 8 bit operating system originally coded for a 4 bit microprocessor,
written by a 2 bit company.



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch