Why D is not a popular language?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Wed Jan 13 09:24:30 UTC 2021


On Wednesday, 13 January 2021 at 08:13:18 UTC, evilrat wrote:
> Heck, even I myself was thinking about making my own 'Better D' 
> transpiler with new fancy sugar such as optional semicolon, 
> fancy null conditional and null coalescing operators (aka ?. 
> and ?? in C#) and such.
> Thanks to dmd as a library this might be even possible as a one 
> man project.

I strongly encourage you to give this a try. The more 
experimental branches people create, the better. New features 
should not be added to the main branch without people having used 
it for some time IMHO.

What I've done is to modify the compiler so that it accepts a new 
file-extension so that I can create my own modified parser as a 
duplicate, keeping the original parser for ".d" files. That way 
you can reuse all existing D-code and yet have full freedom to 
experiment.

I haven't kept track of how much time I've spent on this, but 
maybe 3 days in total, starting from scratch? As you can see, 
I've made many small changes: 
https://github.com/OlaFosheimGrostad/dex . So, again, I would 
encourage you to try this. It takes some time to get familiar 
with the AST, but when you figure it out you have the ability to 
play with your ideas with little resistance. :)

I haven't written enough tests for those changes though... so, I 
guess you would have to add at least 1 more day for that... :-)



More information about the Digitalmars-d mailing list