A Few thoughts on C, C++, and D

Gerald via Digitalmars-d digitalmars-d at puremagic.com
Mon May 29 13:56:31 PDT 2017


On Monday, 29 May 2017 at 16:08:11 UTC, Russel Winder wrote:
> I like the comment from DConf that D should be the successor to 
> Vala for writing GObject-based code. We have GtkD and in it 
> GStreamer. Writing programs in C with them is a real pain in 
> the a### and using C++ is only a little bit better. Having a 
> number of exemplar applications showing how good D is for this 
> sort of application would be a big win. I have been steeling 
> myself to rewrite Me TV in D for two years, but there is always 
> another problem that means leaving it in C++ is easier.

I'm glad to see the message resonated with you, thanks for 
watching :)

> My biggest problem of the moment is libdvbv5 and librtlsdr. 
> DStep seemingly cannot help as yet, and wrapping manually is a 
> pain, and there is no GIR files for these. Thus D is a non 
> starter whereas C++ can just use the C header files.  This 
> inability to get past the inertia is a huge barrier. Seriously, 
> I end up with C++ because the manual wrapping hill is too steep.

I can understand this since if GtkD never existed I probably 
would have gone with Python or Vala, it would have been way too 
much work to bite off. Unfortunately at the end of the day 
someone has to step up and do the work and I suspect that 
gstreamer is a pretty niche area of interest.

> And… if the application is written in C++ or C there might be 
> others willing to join in. As soon as the application is 
> written in D, there appears to be no audience of people willing 
> to get stuck in to help evolve the application. So here is the 
> real barrier: writing GtkD/GStreamerD applications is less 
> attractive because everyone in the universe expects such 
> applications to be written in C or C++.

For Tilix the number of D contributions has been quite small, 
though I'm not convinced that it's because of D any more then 
it's because developers have little experience or interest in GTK 
and desktop applications. I think most of the C, C++ or Python 
based GTK open source projects also suffer from lack of 
contributors, it's always an issue in the open source world 
unless your project happens to be "hot" for some reason.

> Each person trying to reach over the barrier tends to be an 
> island to themselves as no-one else seems to give a #### about 
> the problem that person is interested in.  The isolation of the 
> people trying to get D some traction is arguably the biggest 
> barrier to traction for D. It's the "no-one does it because 
> no-one does it" problem.

Again though isn't this common for most open source projects? I 
will say that I've always found the D community to be very 
welcoming and I've never considered myself isolated or an island. 
It's more just a case that I have an itch to write desktop 
applications and this gives me an opportunity to scratch it. 
Other folks may have different itches and not be interested in 
working on my project, GTK apps or other things and that's OK.

> If everyone in the D community got interested in and just 
> supplied moral support and advice for everyone else, even 
> though the application was uninteresting, there might be the 
> possibility of serious traction. Which then becomes a 
> self-fulfilling prophesy.

Not to be harsh, moral support isn't worth a hill of beans, give 
me people willing to work and get shit done. To me this is the 
biggest thing, it feels like there is a lack of applications 
written in D. However, maybe it's just me and I'm not looking in 
the right places.

As a humorous and somewhat related item, there was a recent 
thread about Tilix in the reddit/ubuntu page with this witty 
comment:

"Oh my god, a real D application"

https://www.reddit.com/r/Ubuntu/comments/6ddf0t/tilix_is_a_stunning_tiling_terminal_emulator/


More information about the Digitalmars-d mailing list