D enters Tiobe top 20

FeepingCreature feepingcreature at gmail.com
Mon Mar 9 12:27:34 UTC 2020


On Saturday, 7 March 2020 at 02:49:43 UTC, SrMordred wrote:
> On Friday, 6 March 2020 at 20:14:38 UTC, jmh530 wrote:
>> With respect to C interop specifically, what does dpp need to 
>> be *there*?
>
> There are still somethings that fail to parse.(but thats a 
> minor thing )
> But the "problem" i see is that is a separate project. I have 
> to clone it, make a working executable (that had problems on 
> windows on the first time that i tried , but it was solved), 
> then make a dpp file (instead of just working with D files ).
> Not sure how it work with header only libs.
>
> Its not that we can´t do nice stuff with it, but this little 
> frictions slowly build up, and u start to look for alternatives.
>
> And it feels like outside the realm of D.
> (where do a manage all this ? postScripts in dub files?, 
> makefiles? caching? )
>
> I questioned a few days ago about an integration of dpp with 
> dub that i heard last year (that can potentially decrease this 
> friction ), but nobody answered me.

When I made my D-lite language Neat back in 2009ish, one of the 
things I was most proud of was the C interop. You could just 
write `import c.SDL` and it would go look for SDL.h, give it to 
gcc to preprocess, fish out defines, structs and function 
declarations and insert them all into a module. There was even 
magic glue that made the common case of "void foo_fun(FooState* 
state, int i)" callable as "state.fun(i)", with zero extra effort 
required. It was very slick when it worked :)

To be fair, I could only do this because I was the only user, and 
I could tweak the C parser as required; it never really worked 
*reliably* for a new header. Still, the sheer ease of use is 
something I do miss.

If D ever gets macros, or I get my own "D with macros" language 
going, whichever of those very unlikely events comes first, this 
is definitely something that should be a macro, but with a CTFE 
macro something like `import include.SDL` seems very doable.



More information about the Digitalmars-d mailing list