D to C compiler?

Daniel Keep daniel.keep.lists at gmail.com
Sat Feb 7 20:05:49 PST 2009



Joel C. Salomon wrote:
> Nicolay Korslund wrote:
>> The exception problem and C could be sidestepped altogether by compiling to C++ instead of pure C. All the major console SDKs at least will compile C++. This doesn't mean we would need to use any more C++ features like classes or templates, the result could be pretty much "C with exceptions". An added benefit would be automatic eh compatibility with existing C++ code, on all platforms.
> 
> Is the D exception system not expressible in C? I’d much rather not see
> a greater dependency on C++ than already exists.
> 
> —Joel Salomon

You might be able to do it with setjmp/longjmp, but it'd probably be
horrible.

This isn't a dependency on C++; it's just that C++ has exceptions and C
doesn't.  The only dependency D has on C++ is that the front end is
written in it.  Hopefully someone will come along and fix that one day. :)

  -- Daniel



More information about the Digitalmars-d mailing list