proposal: heredoc comments to allow `+/` in comments, eg from urls or documented unittests

Elie Morisse syniurge at gmail.com
Mon Feb 12 02:26:27 UTC 2018


On Monday, 12 February 2018 at 01:27:19 UTC, Walter Bright wrote:
> On 2/11/2018 5:05 PM, Nick Sabalausky (Abscissa) wrote:
> Know what is a heavyweight problem worth our while? Having dmd 
> be able to directly read C .h files, so the poor user does not 
> have to manually translate them.
>
> We've already got a huge chunk of that problem solved. The 
> Digital Mars C/C++ front end is now Boost licensed. It can be 
> used. It's already been converted to D! The preprocessor in it 
> is a bit dated and a bit too specific to Windows - but we've 
> got Warp now!
>
> Replace the preprocessor in dmc++ with Warp, slice off the back 
> end, and make it a module that dmd can import.
>
> Wouldn't it be nice to support:
>
>     import stdio.h;    // Look, Ma! C headers!
>
> There are some intractable issues, and it may be impossible to 
> get 100% to "it just works", but looking past that it might be 
> a huge win for us.

Wow, you converted DMC++'s front-end to D?

To chime in on that, Calypso i.e the LDC+Clang equivalent of what 
you described isn't dead (it just revived a few weeks ago from a 
long slumber) and it should be possible to make a smaller 
codegen-less version for DMD that only depends on a few Clang and 
LLVM support libraries. Another possibility..


More information about the Digitalmars-d mailing list