About the front-end & dogfood
Bill Baxter
dnewsgroup at billbaxter.com
Fri Mar 7 14:00:33 PST 2008
About this: http://www.digitalmars.com/d/2.0/faq.html#dogfood
"""
The front end is in C++ in order to interface to the existing gcc and
dmd back ends. It's also meant to be easily interfaced to other existing
back ends, which are likely written in C++.
"""
Aren't most compiler back-ends written in C, or at least come with a C
interface? Given that basically nothing can call C++, not even C++ code
from another compiler, why would you seal your back end up in C++?
It's pretty obvious that front end writers are eventually going to want
to write their front ends in their target language, since everyone knows
the "eat your own dogfood" mantra. So C is really the only logical
language choice for a general-purpose back-end interface.
Assuming I'm right and there is a C interface on any back end that
matters, there shouldn't be any problem writing the front end in D, just
extern(C) where necessary.
Right?
--bb
More information about the Digitalmars-d
mailing list