🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.misc
Article #3405

Re: Turbo Pascal vs. C

#3405
From: Jeffrey P. Bakke
Date: Mon, 24 Sep 1990 08:46
51 lines
3476 bytes
In article <410@saxony.pa.reuter.COM> dgil@pa.reuter.COM (Dave Gillett) writes:
> In <5953@plains.NoDak.edu> bakke@plains.NoDak.edu (Jeffrey P. Bakke) writes:
> 
> Pure myth.  (a) C and Turbo Pascal are of roughly equal power and flexibility,
> and anything you can write in C could be written in Turbo Pascal.  (b) Even if
> their differences in this regard were significant, they'd still be far from
> "infinite".
Ok, I guess I was a little frugal with the use of the word infinite (hey 
just learned it and had to use it :-).  Anyway, I will agree that (a) yes,
anything that you write in C can be written in Pascal, but then again, the
same could be said about any two languages.  You could write a inventory
management program in Lisp or ADA but that proves nothing.  You would 
want (I would hope) to choose the language that is the most appropriate
and easiest to code you specific program need.  If I wanted a program to
perform Fast-Fourier Transforms and other Wave functions, I would probably
use Fortran over C or Pascal.  It really depends on what you're doing.
> 
> >  If you need your programs to execute faster, C would also
> >be the better choice.  Good C code, with a good optimizing compiler is
> >second only to assembly in execution speed (and infinitely easier to code).
> 
> Hmmm...  Infinite again.  Most of the things an experienced programmer does in
> "good C code" to suggest optimizations to the compiler can also be done in 
> Turbo Pascal.  It's true that the best C compilers do more optimization than
> the best Pascal compilers, but Forth gives assembly a good run for its money
> and so I doubt see is second.
> 
Ok, sorry about "infinite".  Anyway, most programming language books (at 
least what I've seen) will generally agree that assuming you have nothing
special in a compiler, C code usually (with good coding) can create faster
code than Pascal.  Simply because C is closer to the assembly level than
pascal and many different code changes can produce the same end results.  Of 
course, many times this is really besides the point.  I find that if your
program is too slow, look at the algorithm, not the code.  But there are
times (comm port IO, Direct graphics) where C code can be written to 
execute faster than Pascal.  Again, this can be somewhat subjective and
can be influenced by the compiler optimizations.  

Anyway, this is simply my opinion based on what I've learned.  I don't want
to go to war over which is better.  There are very few languages that I
hold in contempt, Pascal and C aren't in that list.  I use both and enjoy
both.  


Jeffrey P. Bakke               Internet: bakke@plains.NoDak.edu 
                      UUCP    : ...!uunet!plains!bakke
           BITNET  : bakke@plains.bitnet  
-- 
Jeffrey P. Bakke               Internet: bakke@plains.NoDak.edu 
                      UUCP    : ...!uunet!plains!bakke
           BITNET  : bakke@plains.bitnet  
Technical Details
Message-ID: <5985@plains.NoDak.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!plains!bakke
References: <1990Sep20.164153.28641@portia.Stanford.EDU> <5953@plains.NoDak.edu> <410@saxony.pa.reuter.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!plains!bakke
From: bakke@plains.NoDak.edu (Jeffrey P. Bakke)
Newsgroups: comp.sys.ibm.pc.misc
Subject: Re: Turbo Pascal vs. C
Summary: Waste of bandwith :-)
Message-ID: <5985@plains.NoDak.edu>
Date: 24 Sep 90 08:46:37 GMT
References: <1990Sep20.164153.28641@portia.Stanford.EDU> <5953@plains.NoDak.edu> <410@saxony.pa.reuter.COM>
Distribution: comp
Organization: North Dakota State University, Fargo
Lines: 51