rcd@ico.isc.com (Dick Dunn) (12/23/89)
A posting from Bill Wolfe suggested to me that there might be a way to end one language war...Bill had mentioned: > ...Classic > Ada, a preprocessor used to generate Ada code which implements the > object-oriented mechanisms of inheritance and dynamic binding... I hadn't been aware of this, but I've known all along that C++ was done as a preprocessor. The thing that I hadn't realized, that's important, is that it's apparently within the spirit of proper Ada usage to construct a language variant with a preprocessor! So...we know that we can preprocess C++ -> C. I suspect one can preprocess to get C -> Ada. Combine the two and you've got a tool analogous to "Classic Ada" except that its input looks like C++. C++ programmers can create Ada programs without having to learn nasty old Ada, and they can stop complaining about what Ada lacks. Ada partisans can stop flaming C++ folk for being nasty hackers who refuse to see the clear superiority of the One True Language. What's wrong with this picture? Being serious for a moment (Bill W says programming is serious), I see three possibilities for the above scenario: - It's OK, in which case it seems that one could make arbitrary changes to "Ada" by this approach--as long as the preprocessor output is Ada. - It's entirely out of the spirit of Ada, in which case I wonder why "Classic Ada" is acceptable. - It's not OK but "Classic Ada" is OK, in which case I wonder where the dividing line lies. -- Dick Dunn rcd@ico.isc.com uucp: {ncar,nbires}!ico!rcd (303)449-2870 ...Mr. Natural says, "Use the right tool for the job."
sakkinen@tukki.jyu.fi (Markku Sakkinen) (12/23/89)
In article <1989Dec22.235145.3195@ico.isc.com> rcd@ico.isc.com (Dick Dunn) writes:
- ...
-So...we know that we can preprocess C++ -> C. I suspect one can preprocess
-to get C -> Ada. Combine the two and you've got a tool analogous to
-"Classic Ada" except that its input looks like C++. [...]
I am afraid the semantics of C (and C++) is much too nasty for translation
to any high-level language. Just think about its wild ways with pointers!
Markku Sakkinen
Department of Computer Science
University of Jyvaskyla (a's with umlauts)
Seminaarinkatu 15
SF-40100 Jyvaskyla (umlauts again)
Finland