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

Jacob Carlborg doob at me.com
Mon Feb 12 20:23:59 UTC 2018


On 2018-02-12 02:27, Walter Bright 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.

Here you go [1]. It's a bit outdated now, from 2013, but it worked back 
then.

[1] 
https://github.com/jacob-carlborg/dmd/commit/2837d340c065cc2bf3f0a83cb96c4d9f22fb3a30

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list