[comp.lang.c] C vs. Modula 2

larryr@sdsu.UUCP (Larry Riedel) (11/14/87)

I am a C programmer, and I am about to start a big programming project.  I
do not know Modula 2.  I am interested to know which language I should use.
I need my program to be fast, but I don't want any weird almost impossible
to trace errors to come up.  It is very difficult for me to get a straight
answer, because people are so religious about this sort of thing.  I get
the sneaking suspicion that Modula 2 is for old Pascal programmes who don't
want to take the responsibilities of programming in C, because whenever
I ask them to compare them, they start to tell me how screwed up C is,
and how it is too hard to understand.  I know that C is fine once you
get to know it, so I question their legitimacy.  What can't you do as easily
in M2 as you can in C?  What can you do in M2 much easier than in C?  Also,
doesn't Modula 2 compile a lot faster (I have an Amiga if anyone has compared
the speeds of the two on this machine>?

Thanks very much,
     -Larry Riedel

Please respond by E-mail:
     ...!{nosc | sdcsvax}!sdsu!larryr

mrd@sun.mcs.clarkson.EDU (Michael R. DeCorte) (11/23/87)

   From: Larry Riedel <sdsu!larryr@ndsuvm1.bitnet>

   I am a C programmer, and I am about to start a big programming project.  I
   do not know Modula 2.  I am interested to know which language I should use.

I have programmed in both and have to say that I like both.  They each
have their own strengths and weakness.  M2 is better at hiding
information and making certain that your functions are interfaced
better but C is better at low-level routines and has a better and more
standard library.  If you have a C compiler with proto-typing then
most of the advantages of M2 disappear with the exception of M2's
concurrent processes.  To say one is better than the other is just
nonsense.  They are both decendents of algol-68 with the same goal.
The only major difference is that C takes the point of view that the
programmer is always right if something is begin done that doesn't
quite make sence while M2 takes the point of view that the programmer
is normally wrong if some is being done that doesn't quite make sence.


Michael DeCorte
mrd@clutx.clarkson.edu
mrd@clutx.bitnet