[DDMD] Reasoning behind converting new Type -> Type::create

Daniel Murphy yebbliesnospam at gmail.com
Mon Jan 27 08:50:41 PST 2014


"Iain Buclaw"  wrote in message 
news:mailman.100.1390839683.13884.digitalmars-d at puremagic.com...
> I tried that once before, only to be asked "Why are you doing this?" :o)

I still think 'verbose' is a good idea (that switch has zero coverage in the 
test suite btw).  But yeah, one thing at a time.

> Admittedly, it had some other stuff until I gave up waiting, sent a
> pull for global.stdmsg (which got merged in) then reimplemented error,
> warning, etc... in gdc.

That seems fine for error/warning/etc but Loc and Global should really be 
shared.  Although global really shouldn't have so much crammed into it.  eg 
doXGeneration and debugf mean nothing to the frontend.

> There are some parts that could be ported to D.  But by and large,
> it's not going to be pretty.  ie: There's no possible way for us to
> correctly mangle c_long in D, and there are some types in GCC that -
> depending on the host - could be typedef'd to long, long long or
> int64_t.

We seem to be getting away with that in dmd, as long as OSX and win64 don't 
hide any more nasties.  (btw do you have any idea what's wrong with pull 
3158?)

Making functions extern(C) seems to be the easiest short-term solution, and 
pragma(mangle) will start actually working on windows once the new C++ 
mangler is in. 



More information about the Digitalmars-d mailing list