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

Walter Bright newshound2 at digitalmars.com
Mon Feb 12 01:27:19 UTC 2018


On 2/11/2018 5:05 PM, Nick Sabalausky (Abscissa) wrote:
> That's the same exact reason most languages don't have most of the nice things 
> in D, like separators for numeric literals: Because they're not strictly 
> necessary. But if D had never been willing to improve the state of the art by 
> not being afraid of "not stricktly necessary" features, very few of us would 
> have ever had reson to come onboard with D in the first place. And yes, I know 
> D's not at that point any more. And that's one of my biggest dissapointments 
> with D.

D is already a very large language. There's got to be a point where some pruning 
makes for a better language. Adding more and more lightweight features for 0.1% 
use cases when we neglect heavyweight features for 30% use cases is not where we 
should be shooting our arrows.

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.

And, let's not forget working on ref counting.


More information about the Digitalmars-d mailing list