comp.lang.ada
 help / color / mirror / Atom feed
From: dweller@universe.digex.net (David  Weller)
Subject: Re: Ada to C++ Translators
Date: 1998/02/18
Date: 1998-02-18T00:00:00+00:00	[thread overview]
Message-ID: <6ceq7m$3nc@universe.digex.net> (raw)
In-Reply-To: 34eb5d36.20077308@news.tiac.net


In article <34eb5d36.20077308@news.tiac.net>,
Jean D. Ichbiah <ichbiah@twsolutions.com> wrote:
>
>[Deletia related to somebody asking for an Ada to C++ Translator]
>
>> Let's save Mr. Kusuda a bag of time:
>> 
>> 	1) It can be done
>> 	2) Over a lot of time
>> 	3) With a lot of money
>> 	4) Starting from scratch is MUCH cheaper
>> 	5) It's a pretty dumb thing to do anyway
>> 	    (It takes less code to do a project in Ada95 than in C++)
>
>Why so intolerant?  Perhaps if you are asking about an automatic 
>translator.   But hand translation is possible.  A well-designed Ada
>program will translate into a well-designed C++ program.  (And a messy
>Ada program - I have seen some horrifying examples too - will convert
>into another mess.)  In this context of hand translation:
>
>1) is certainly true.
>2) is incorrect.  For a well designed program, it can be done in
>linear time.
>
>3) is wrong.
>4) is wrong also: why repeat the careful analysis done in the first
>place
>

Your four rebuttals are indeed correct for hand-translation.  Of
course, one could say it's a red herring, since the question was in
response to _automated_ translation.

>5) is an academic assertion.  
>

Wrong.  It's an unpublished _fact_.  Big difference.  My work with the
C++ Booch Components (_hand_ translating them into Ada95) yielded
around a 10% _reduction_ in overall code.  It would be fair to qualify
where that reduction came from: The template syntax in C++, IMHO,
stands as one of computer science's most outstanding examples of
abominal syntax.  The necessity to repeat the signature syntax in all
but the most confined circumstances stands as an eternal monument to
C++'s convoluted "I'm Object-Oriented But I MUST Act Like C" motto.
(Also IMHO, given what Bjarne had to work with, I don't think it could
have been done with any more elegance, so this isn't a slam on his
design effort).  Imperative code, namespaces, exceptions, etc.
generally pan out to a 1:1 basis.  Ada shines in generics and usage of
those generics.  I'm personally starting to pine for something that
combines what I feel are the best features of Ada and C++, and it
AIN'T called Java!

>The namespace concept helped a lot.  My impression of C++ is that
>it is a huge language and that you can easily get lost.  But if you
>start from a clean model, it is easier to restrict yourself to a
>manageable subset.
>

I, too, work in C++ every day.  Unfortunately, finding developers that
can exercise "feature restraint" is a rare occurrence :-)

Namespaces are nice, but most compilers still don't handle the
combination of namespaces and templates very well (as well as numerous
other things :-( )

-- 
   ******   NEW!!  DoD Ada Hotline Number:  1-800-PARIAH    ******
Tired of "junk" e-mail?  Write to your congressman and tell them you support
H.R. 1748, "The Netizens Protection Act of 1997".  Make those SPAM-roaches run!             http://www.cauce.org          TAKE BACK THE INTERNET!




  reply	other threads:[~1998-02-18  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-13  0:00 Ada to C++ Translators David Kusuda
1998-02-14  0:00 ` Larry Kilgallen
1998-02-16  0:00   ` David  Weller
1998-02-18  0:00     ` Jean D. Ichbiah
1998-02-18  0:00       ` David  Weller [this message]
1998-02-18  0:00         ` Brian Rogoff
1998-02-21  0:00           ` Esa Pulkkinen
1998-02-23  0:00             ` Brian Rogoff
1998-02-19  0:00         ` Jean D. Ichbiah
1998-02-19  0:00           ` Larry Kilgallen
1998-02-25  0:00         ` Scott Leschke
1998-02-25  0:00           ` David  Weller
1998-02-19  0:00       ` Delphi & Ada; Ada to C++ Nick Roberts
1998-02-19  0:00         ` David  Weller
1998-02-19  0:00           ` Nick Roberts
1998-02-19  0:00             ` Jon S Anthony
1998-02-20  0:00               ` Nick Roberts
1998-02-21  0:00                 ` Richard Kenner
1998-02-21  0:00                   ` Robert Dewar
1998-02-21  0:00           ` Simon Wright
1998-02-21  0:00             ` Richard Kenner
1998-03-05  0:00               ` Robert I. Eachus
replies disabled

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