Article View: comp.lang.modula2
Article #4556Re: C++ vs. Modula2
From: Dave Haynie
Date: Tue, 03 Jan 1989 17:59
Date: Tue, 03 Jan 1989 17:59
44 lines
1957 bytes
1957 bytes
in article <114700003@uxa.cso.uiuc.edu>, gsg0384@uxa.cso.uiuc.edu says:
> Nf-ID: #N:uxa.cso.uiuc.edu:114700003:000:647
> Nf-From: uxa.cso.uiuc.edu!gsg0384 Dec 22 00:03:00 1988
> ...FORTRAN 8x for numerical computation
> C++ for system and object-oriented programming
> Modula 2 for general purpose and eduation
> 1) Is C++ not appropriate for general purpose? Why?
I use C++ for general purpose programming, and would have no interest in
using Modula 2 for such a task. It's certainly a matter of personal
preferences, but I think the object oriented features of C++ make good
C++ code easier to write and maintain than anything I've used in the
past.
> What I particularly want to know is:
> 3) Which of the two languages, Modula 2 and C++, is better suited for numerical
> computation?
I'd pick C++ for that, some might pick M2. In C++, I have the option of doing
something like:
#include <complex.h>
#include <streams.h>
...
complex a(3,4), b(2,3), c;
c = a * b;
cout << "The result is" << c << "\n";
In M2, you're going be calling functions for the multiply and probably other
things. That's not to say you can't achieve exactly the same results in M2
that you can in C++, but I think I'd go mad if I had to do lots of complex
math, or other similar things, in M2.
> Thanks in advance.
> Hugh gsg0384@uxa.cso.uiuc.edu
--
Dave Haynie "The 32 Bit Guy" Commodore-Amiga "The Crew That Never Rests"
{uunet|pyramid|rutgers}!cbmvax!daveh PLINK: D-DAVE H BIX: hazy
Amiga -- It's not just a job, it's an obsession
Technical Details
Message-ID:
<5611@cbmvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cbmvax!davehReferences:
<114700003@uxa.cso.uiuc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cbmvax!daveh From: daveh@cbmvax.UUCP (Dave Haynie) Newsgroups: comp.lang.modula2 Subject: Re: C++ vs. Modula2 Message-ID: <5611@cbmvax.UUCP> Date: 3 Jan 89 17:59:36 GMT References: <114700003@uxa.cso.uiuc.edu> Organization: Commodore Technology, West Chester, PA Lines: 44