Re: C++ equivalent to spaghetti code
On 20 Jul., 21:59, James Kanze <james.ka...@gm ail.comwrote:
That was the case for "my" financial application. It had decimal-based
arithmetic, and writing expressions in C was
add(multiply(a, b),divide(c,d)) instead of a*b+ c/d. But as a lot of
the high-level code was written in our own, interpreted language
anyway it did not matter so much.
/Peter
On 20 Jul., 21:59, James Kanze <james.ka...@gm ail.comwrote:
On Jul 20, 10:50 am, "Alf P. Steinbach" <al...@start.no wrote:
>
>
There are certainly a few. Way back when, however, the X/Open
group proposed standardizing a form of Cobol (under Unix!)
because C was felt to be unusable for business applications.
>
At least certain types of business applications require some
sort of decimal type. If the language doesn't have it built in
(as Cobol and PL-1 did), and it doesn't have operator
overloading, expressions quickly become unreadable. For those
applications, at least, if the language doesn't have a built-in
decimal type, and it doesn't have operator overloading, then
it's really unusable for those applications (although you'll
doubtlessly find some masocists doing it).
>
>
* James Kanze:
I'm not sure that statement is valid.
It would be very surprising, to say the least, if no or just a
very few commercial applications were written in C.
C was never really a good general purpose language. It was
never used (nor even usable) in commercial software, for
example.
never used (nor even usable) in commercial software, for
example.
It would be very surprising, to say the least, if no or just a
very few commercial applications were written in C.
There are certainly a few. Way back when, however, the X/Open
group proposed standardizing a form of Cobol (under Unix!)
because C was felt to be unusable for business applications.
>
At least certain types of business applications require some
sort of decimal type. If the language doesn't have it built in
(as Cobol and PL-1 did), and it doesn't have operator
overloading, expressions quickly become unreadable. For those
applications, at least, if the language doesn't have a built-in
decimal type, and it doesn't have operator overloading, then
it's really unusable for those applications (although you'll
doubtlessly find some masocists doing it).
>
arithmetic, and writing expressions in C was
add(multiply(a, b),divide(c,d)) instead of a*b+ c/d. But as a lot of
the high-level code was written in our own, interpreted language
anyway it did not matter so much.
/Peter
Comment