-betterC is amazing, make (/keep making) it more sophisticated!

Radu void at null.pt
Thu Mar 22 15:42:54 UTC 2018


On Wednesday, 21 March 2018 at 22:48:36 UTC, Seb wrote:
> On Wednesday, 21 March 2018 at 22:33:37 UTC, Aedt wrote:
>> I've been playing with D for a while. I usually 
>> write/maintain/contribute to C and C++ applications for *nix. 
>> D is low key amazing, it has
>> - C standard library in the standard
>> - continually improving betterC idioms
>> - built in version blocks, unit test and debug blocks
>> - painless doc gen
>> - modules and painless dependency handling
>> - linter, formatting tool and suggestion tool independent of 
>> editors
>
> Thanks a lot for these kind words!
>
>> Now if D manages all of the following it's going to be even 
>> better:
>> - complete porting the C99 compliant C compiler fornt end to 
>> the D compiler so you can seamlessly just import C headers 
>> (like C++)
>
> I heard that Walter recently ported his DMC++ to D and I heard 
> that someone was working on this, so chances aren't too bad 
> that this might happen ;-)
>
>> - Improve shared library support
>
> What do you miss / are referring to?
>
>> Don't know about other C programmers but if D grants me to 
>> write C with modules, doc gen and dep handling, I can switch 
>> any day! But I need to be able to use tons of C libraries 
>> without having to writing wrappers for them.
>
> Not sure whether you are aware of these two projects?
>
> https://github.com/jacob-carlborg/dstep (converts C headers to 
> D headers auto-magically)
>
> https://github.com/Syniurge/Calypso (LDC fork which allows 
> direct interfacing with C/C++ code)
>
> For my use cases dstep works nicely.

Would be nice to have a facility to generate C headers from a 
module, ala' `-H` but instead of generating D .di to generate C 
compilable .h files.

I find it tedious to manually generate those, so for some 
projects I use some template magic and pragma(msg, ...) to 
generate a bunch of defines/declarations, but having it build in 
into the compiler would make it even better!


More information about the Digitalmars-d mailing list