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

Walter Bright newshound2 at digitalmars.com
Mon Feb 12 03:17:20 UTC 2018


On 2/11/2018 6:26 PM, Elie Morisse wrote:
> Wow, you converted DMC++'s front-end to D?

Yes, it's just frustrating for me to work on C++ code anymore. :-)

> 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..

Good ideas! Some things to consider:

1. I'd like this to be pluggable, so that different compilers can be used 
without being disruptive to dmd.

2. DMC++ is not only a C compiler, but a C++ compiler. The C++ compiler, though, 
is stuck on C++98 and is unlikely to see much improvement on that.

3. BetterC is called BetterC and not BetterC++ because D's C++ interop is more 
fragile than the C interop. I felt it better to nail the C end first.

4. It certainly would be nice to be able to insert C++ headers, too, but I'd 
expect more problems (!).

5. C is stuck at C99. Being a fixed target makes it more tractable. Supporting 
C++ means constant revisions and high support costs.

6. Using DMC++ as a front end would add somewhat less than a megabyte (half?) to 
the binary size of dmd. I have no idea what Calypso or other solutions would 
add. If they are large, they may only make sense as a separate executable as a 
filter.



More information about the Digitalmars-d mailing list