From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,63bbc3281a2f80ea X-Google-Attributes: gid103376,public From: afn03257@freenet2.afn.org (Daniel P Hudson) Subject: Re: Ada vs. C Date: 1996/08/09 Message-ID: <4ue8go$1c6@huron.eel.ufl.edu>#1/1 X-Deja-AN: 173037793 references: <3208F2BA.E34@freenet.scri.fsu.edu> reply-to: afn03257@afn.org nntp-posting-user: afn03257 newsgroups: comp.lang.ada Date: 1996-08-09T00:00:00+00:00 List-Id: The Quelisher 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 int main(void) { printf("Hello, World!\n"); return 0; } -------------------------------------------------------------------- // cpp #include 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.