My Long Term Vision for the D programming language

WebFreak001 d.forum at webfreak.org
Wed Nov 17 09:54:31 UTC 2021


On Wednesday, 17 November 2021 at 07:54:26 UTC, SealabJaster 
wrote:
> On Wednesday, 17 November 2021 at 07:37:24 UTC, Elronnd wrote:
>> On Wednesday, 17 November 2021 at 07:25:46 UTC, Robert Schadek 
>> wrote:
>>> Also you can not have string interpolation without dynamic 
>>> memory.
>>
>> Both of the string interpolation proposals were specifically 
>> designed to permit this.
>
> And I believe this ties into his "Let's not aim for perfect" 
> angle, which I agree with.
>
> If anything, this thread simply shows yet again the extreme 
> divide in D's userbase.
>
> "Get rid of GC"
> "Make GC optional"
> "Fully embrace GC"
>
> "Go after the C devs"
> "Go after the higher level devs"
>
> "I want to be able to write kernals in D"
> "And **I** want to be able to do embedded stuff in D!"
> "Well, **I** want to make games in D"
> "Humph, **I** want to make Native applications in D"
> "Jokes on you, I want to make a web server in D"
> "pfft, I just want to make quick scripts and tools!"
> [All the above are on differing levels of requirements 
> regarding high-level and low-level features]
>
> "Don't you dare touch Phobos with your GC trash"
> "Pretty please actually put stuff into Phobos"
>
> "Don't you dare add features to this language, just write a 
> library"
> "Pretty please add native sumtypes so it's actually possible to 
> debug when things don't compile"
>
> "Add string interpolation"
> "but it has to also work with printf because Walter says so"
> "also not like that since it needs to work in -betterC @nogc 
> nothrow pure const shared"
> "but it also needs to be easy to use because people from other 
> languages expect things to just work"
> "but that means we can't use @nogc which is a hard requirement 
> for the GC-phobics"
> "but but but"
> "fuck it let's just scrap it so everyone loses out, just write 
> `mixin(interp!"")` instead, nerds"
>
> D - the language of endless bickering and lack of cohesive 
> action.
>
> Still absolutely love the language though, but we really need 
> to get ourselves together at some point, because we're stuck in 
> an endless loop of trying to be everything yet nothing.

this sums up the community really well. I would love if we would 
go forward with the plan proposed by Robert here really, though 
keeping the options to disable runtime and stuff like betterC.

Phobos should really be for the average D programmer, and if that 
can be -betterC @nogc nothrow pure const shared, great! But that 
shouldn't be the design goal IMO. When I use phobos, I want easy 
to use, flexible, readable code that doesn't make me do the wrong 
things - I want to save time using it. When I need -betterC @nogc 
code to make a kernel or program a micro-controller there are 
plenty of good utility libraries on DUB that nobody seems to be 
using - we should make that group of users especially use and 
publish more DUB libraries.

I think -betterC @nogc code is for rare use-cases (compared to 
90% of other code you will write) - they exist and certainly are 
important, especially for building a good base for some of your 
other D code, but they are not what I want to use for all code.

Unstructured rambling section:

When I started using D I was especially drawn in by the great 
easy-to-use, flexible, batteries-included stdlib + package 
manager bundled with the language installation for all my other 
needs. Not a lot has been added to the stdlib since then, 
actually useful stuff like std.xml has been/will be removed due 
to it being not up to phobos' standards. Having too many 
dependencies quickly introduces issues, especially when the 
dependencies have more dependencies, worse even if they have 
different versions.

D really shined in making web servers with vibe.d - it was easy 
to transition from express.js. Vibe.d is still my go-to library 
for all my web services, but not a lot is really moving forward 
in this space, would love to push more here, especially with 
stuff like HTTP 2/3 that was promised with vibe-http, that halted 
for some reason though and I don't know how to improve on that 
really other than making my own vibe-http from scratch.

I'm also a big fan of GtkD, would love to see proper GTK 4 
support going in though - I'm feeling unsafe using the gtk4 
branch right now with the d_adw library on DUB that doesn't even 
have a README! Here too I think gtk4 is pretty usable, I don't 
know what's holding it up. Sure there are gonna be issues, but 
you can always fix those with later updates.


More information about the Digitalmars-d mailing list