size_t.sizeof == 2 && __LINE__.sizeof == 4

Brad Roberts via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 10 13:37:37 PDT 2017


On 7/10/17 10:49 AM, Luís Marques via Digitalmars-d wrote:
> On Monday, 10 July 2017 at 17:32:01 UTC, Iain Buclaw wrote:
>> The official stance is that we don't.  There is just far too much 
>> baggage that gets piled in by default that makes it very hostile, 
>> however those of us who are capable of doing so won't try to stop you, 
>> and you have the likes of minilibd and other minimal D libraries as 
>> friendly replacement, perhaps you could even use them on top of musl. ;-)
> 
> By "we don't" it seems you are referring to supporting D + druntime + 
> Phobos. But, to clarify, plain -betterC D seems to work well. One issue 
> is that size_t currently has the wrong size, and changing it involves at 
> least some druntime support (changing object.d, and changing all of the 
> size_t line = __LINE__ fallout).
> 
> BTW, I wasn't sure how I should go about changing druntime and Phobos 
> regarding the size_t line -> line_t line transition. I opted to change 
> LDC's fork of druntime first, because it seemed to me like the 
> contribution had a better chance of being accepted, and afterwards make 
> a separate dlang/druntime pull request. But the more natural way would 
> probably be to change the canonical druntime first and then merge the 
> changes on the LDC side, no?
> 
> - Luís

I think this is a great example of a project where the best path is to 
fork the compiler, runtime, and phobos (if you intend to go that high up 
the stack) and just go do it.  Don't worry, for the short term, about 
any of the naming issues, mergability, etc.  Make it work, use it, learn 
what the big issues are, etc.  Then, cycle back and look at how to 
merge.  I suspect there's going to be a lot of issues and finding out 
what's important to disucss in what order is useful.  Getting bogged 
down early is going to be frustrating.


More information about the Digitalmars-d mailing list