Why is D unpopular?

IGotD- nise at nise.com
Fri May 13 19:43:25 UTC 2022


On Friday, 13 May 2022 at 19:18:35 UTC, Walter Bright wrote:
>
> The fact that there are 3 of them suggests shortcomings.
>
> ImportC can:
>
> 1. handle C constructs that don't have D equivalents, such as 
> bitfields and _Generic (yes, I did recently add the bitfields 
> to D).
>
> 2. inline C functions
>
> 3. do CTFE on C functions
>
> 4. D and C source files can be handed to the dmd command line
>
> 5. no special syntax for importing C files
>
> 6. can be used as a straightforward C compiler
>
> 7. import D code (!)
>
> 8. minimizes friction in the build system
>
> 9. do inline assembler (well, D style inline assembler, not 
> gcc/cl/dmc style)
>
> 10. generate linkable libraries from C code
>
> 11. make it easy to incrementally convert C code to D
>
> 13. make mixing and matching D and C code almost trivial

Nice, but I will give you a challenge. You are going to write a 
Linux driver in D (or better C) and you are only allowed to 
import C the necessary header files like <linux/kernel.h>, 
<linux/init.h> etc.


More information about the Digitalmars-d mailing list