prePEP: Money data type

Alex Martelli aleax at aleax.it
Sat Oct 18 14:28:12 EDT 2003


Paul Rubin wrote:

> "John Roth" <newsgroups at jhrothjr.com> writes:
>> Like I said, you do it your way. That is, write the necessary COBOL
>> code to round it the way you want. Ths is not as easy as it sounds
>> since COBOL is completely lacking in the basic abstraction facilities
>> such as subroutines with parameters within a single Procedure Division.
> 
> That's bizarre, is it really done like that in the actual real world?!
> I thought Cobol had built-in arithmetic, like "add gin to vermouth
> giving martini".  Does it have "operator overloading", so that the add
> statement acts differently depending on how you've implemented
> rounding?

No (no overloading).  But comparing Cobol's arithmetic to a mistaken
belief that a decent Martini cocktail is somehow automatically obtained
by "adding gin to vermouth" IS quite an apt simile (there's about six
bars here in Bologna I can count on to serve decent Martini cocktails:
the other hundreds of bars subscribe to the "Cobol arithmetic" approach:-).


Alex





More information about the Python-list mailing list