The forked elephant in the room

ryuukk_ ryuukk.dev at gmail.com
Sun Jan 28 12:41:06 UTC 2024


On Sunday, 28 January 2024 at 05:29:54 UTC, Walter Bright wrote:
> On 1/27/2024 8:20 PM, FairEnough wrote:
>> A feature pulled in, essentially without any community 
>> involvement at the time, has resulted in 317+ bugs being 
>> summitted, and in addition, peoples time (perhaps mostly 
>> yours) spent resolving at least 274 of them.
>
> Those issues were about ImportC, not the rest of the compiler. 
> As compilers go, this is a remarkably small number.
>
> As for the time, it is mine to spend as I see fit. Nobody is 
> paying me.
>
>
>> And you're justification is.. "ImportC is not a language 
>> change, and so did not require a DIP."
>
> Phobos additions don't require a DIP. Code gen improvements do 
> not. Dub does not. C++ header file generation did not. Druntime 
> changes do not. Build system does not. Infrastructure does not. 
> Web site changes do not. And so on. Only language changes 
> involve a DIP.
>
>
>> As a developer in the team at my business, if you had done 
>> this, then you would have been promptly shown the door.
>
> I've done bootleg projects at the companies I've worked at. 
> They were all eventually mainlined into the official products.
>
>
>> btw. None of the above is a comment about the usefulness of 
>> ImportC, or not.
>
> It's fair to consider the result. ImportC elicited more or less 
> no interest from anybody. I expected that. Over time, though, 
> its detractors who have tried it have found it to be a 
> game-changing time saver. ImportC is a huge win for D.
>
> I've implemented a C compiler before, and knew ImportC was 
> going to work. In fact, it worked much better than I 
> anticipated.
>
>
>> It's about the impact of change that was never presented to 
>> the community before it got pulled.
>
> As a proposal, it was not. As a prototype, it was, it just was 
> pulled shortly thereafter.
>
>
>> And those that pulled it are as much to blame.
>
> The fellow that pulled it, Atila, is the author of dpp, a 
> program to import C headers to D. Atila understood the 
> potential of ImportC, probably better than anyone else.
>
>
>> Would such a thing still occur today? (that is a question I 
>> don't know the answer to).
>
> I thought many times about doing an ImportC++, but ran away 
> screaming. Maybe ImportCwithClasses :-)

And i thank you a lot for ImportC, just last week it saved me a 
ton of time

I needed a voronoi library for some proc-gen, i could have wrote 
it myself but would take me too long, so instead went to C land, 
and simply just imported this library:

https://github.com/JCash/voronoi

```c
#define JC_VORONOI_IMPLEMENTATION
#include "jc_voronoi.h"
```

And in D:

```d
import jc_voronoi;
```

And voila, everything works out of the box



More information about the Digitalmars-d mailing list