comp.lang.ada
 help / color / mirror / Atom feed
From: afn03257@freenet2.afn.org (Daniel P Hudson)
Subject: Re: Ada vs. C
Date: 1996/08/09
Date: 1996-08-09T00:00:00+00:00	[thread overview]
Message-ID: <4ue8go$1c6@huron.eel.ufl.edu> (raw)
In-Reply-To: 3208F2BA.E34@freenet.scri.fsu.edu


The Quelisher <kendal@freenet.scri.fsu.edu> wrote:
>I have found one thing that C has an advantage over Ada : executable
>file sizes. Everything I have programmed in Ada is HUGE compared to a
>program thta does the same thing but written in C.

>Just my $.02

 Psst, over here. That's a feature of the COMPILER, not the language.
 Plus, any OO language will compile larger a structured langauge because
 of the overhead OO requires.

 If you don't understand this, let me clarify. Years ago, when Microsofts
 Quick_C 1.0 was still a major sought after item by those trying to learn
 C, I was told by a close-minded friend that I was wasting my time
 writting my programs in Quick_Basic. Besides being the most unintelligent
 statement I had ever heard, after all these were my programs for MY 
 computer and they appeared to be working just fine to me, it was
 a challenge which I accepted. I asked him why and he told me the 
 code was slow and too big. My friend had never even seen a Basic compiler
 so this was his first shock, his second was when QuickBasic 4.5 
 mainly matched QC 1.0 in the final output tests. The language had nothing
 to do with it, the compilers were from the same general time era and
 the company implemented the same technology in both. The library was
 the only that determined which was better, and QB didn't give you the 
 control over FP that QC did, so QC had one advantage. Now, in
 today, most language are equivalent in such tests because compiler
 technology is shared quite freely due to projects like GNU or the
 newsgroup comp.compilers and freely available docs on a variety
 of architectures. However, if you compile these two sources

 /* c */
 #include <stdioh.>

 int main(void)
 {
   printf("Hello, World!\n");
   return 0;
 }

   --------------------------------------------------------------------

 // cpp
 #include <iostream.h>

 int main(void)
 {
   cout << "Hello, World!" << endl;
   return 0;
 }

 I guarentee you that the C code will always come out smaller than the C++
 equivalent will, due to OO overhead. Ada uses OO, even thouhgh you can
 code in a proceedural fashion, the standard libs are designed to be
 used in OO programming and therefore carry the OO overhead. Is this
 a bad thing? Only if you don't feel that an OO approach is the best
 solution to your current task, but it does seem that the CIS community
 is moving toward OOP.




  parent reply	other threads:[~1996-08-09  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-07  0:00 Ada vs. C The Quelisher
1996-08-09  0:00 ` Robert Dewar
1996-08-09  0:00   ` The Quelisher
1996-08-10  0:00     ` steved
1996-08-10  0:00       ` Robert Dewar
1996-08-10  0:00     ` Bob Kitzberger
1996-08-10  0:00     ` Robert Dewar
1996-08-11  0:00     ` Dave Wood
1996-08-14  0:00       ` busigin
1996-08-16  0:00         ` Robert Dewar
1996-08-11  0:00     ` Jerry van Dijk
1996-08-12  0:00   ` Vladimir Vukicevic
1996-08-09  0:00 ` Jack W Scheible
1996-08-09  0:00 ` Daniel P Hudson [this message]
1996-08-09  0:00   ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1995-01-20  4:43 "Subtract C, add Ada" Samuel Mize
1995-01-21 20:28 ` David O'Brien
     [not found]   ` <3g655n$q5k@theopolis.orl.mmc.com>
1995-01-30 15:33     ` Ada vs. C Martijn Bak
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox