News for hackers. Stuff that matters.
Re:Adding ANSI C11 C compiler to D so it can import and comp... by LAC-Tech on Monday May 10, 2021 @06:26AM (#27104461)
Do you think there's tension in Dlang trying be both a systems language like C++ AND a high level garbage collected language in C#?

Which is more important?

Re:Adding ANSI C11 C compiler to D so it can import and comp... by pjmlp on Monday May 10, 2021 @08:07AM (#27105047)
Re:Adding ANSI C11 C compiler to D so it can import and comp... by LAC-Tech on Monday May 10, 2021 @08:13AM (#27105096)
I'm somewhat in agreement.

There are a lot of people in 2021 who - for whatever reason - feel like they need to program personal computers without using GC. As you point history shows that's a lot less true than people think, but nevertheless - that is the sentiment.

Dlang tries spends a lot of effort trying to attract these people, by making more and more of the stdlib nogc, having @nogc annotations, experimenting with deterministic manual memory management etc etc. But I feel like they'll never convert most of them.

Re:Adding ANSI C11 C compiler to D so it can import and comp... by pjmlp on Monday May 10, 2021 @08:43AM (#27105348)
Meanwhile C# and Go keep being improved to play on the same place that D wants to be.

I also agree with the sentiment, the language issues with some not so well worked out features should be fixed, instead of trying to please everyone.

Re:Adding ANSI C11 C compiler to D so it can import and comp... by ku-man on Monday May 10, 2021 @11:11AM (#27106781)
"... the language issues with some not so well worked out features should be fixed, instead of trying to please everyone."

This. For average programmers like myself, latest and fanciest language features are of little value. C++ and (unfortunately) D are in the same quest: to incorporate every programing language paradigm available, the extra complexity be damned. In the specific case of D, I'd rather have a good assortment of native D libraries than more bells and whistles added to the language.

Re:Adding ANSI C11 C compiler to D so it can import and comp... by aldacron on Monday May 10, 2021 @06:46AM (#27104545)
Obviously I'm not Walter, but IMO, D's approach to GC does not create any tension. It's just a systems language with a GC that's there if you want to use it. You can disable it completely or only where you need to. Yes, you lose some features when you do so (like automanaged memory for dynamic array operations), but the tradeoffs are well-known and worth the loss when you need to make them. Consider WekaIO, which used D for their filesystem. No GC anywhere:

https://dlang.org/blog/2018/12/04/interview-liran-zvibel-of-...

Re:Adding ANSI C11 C compiler to D so it can import and comp... by skocznymroczny on Monday May 10, 2021 @07:21AM (#27104714)
I think there's more to the tension than GC. GC is the red herring that everyone jumps to when it comes to such comparisons, but I think there are many more issues that could cause tensions. For example OOP features, inheritance, properties, that kind of things. For system programmer oriented folks these features are usually considered bloat, more high-level/application programmers consider them very valuable features.

For me currently D provides a good level of balance between those worlds, but the aforementioned GC isn't an issue for me at all so I have it easy.

Re:Adding ANSI C11 C compiler to D so it can import and comp... by pjmlp on Monday May 10, 2021 @08:09AM (#27105064)
Depends, the future could already have been here, instead of playing catchup with the past.

"Eric Bier Demonstrates Cedar"

https://www.youtube.com/watch?v=z_dt7NG38V4

Re:Adding ANSI C11 C compiler to D so it can import and comp... by p0nce on Monday May 10, 2021 @07:20AM (#27104708)
If you use D across your organization, you can use the GC for internal tools and scripts, while keeping high-performance product code GC-free. So it's not really a hindrance, as you don't have to use different languages.
Re:Adding ANSI C11 C compiler to D so it can import and comp... by teleforce on Monday May 10, 2021 @08:21AM (#27105170)
This!

I think D should latch and promote more on the idea of having on-demand performance when it's necessary with GC convenience for the rest of the application. Soon having borrow checker capability ala rust and cyclone will only strengthen the narrative.

Re:Adding ANSI C11 C compiler to D so it can import and comp... by mhh__ on Monday May 10, 2021 @08:50AM (#27105419)
That's what we already do however the popularity of things we thought were obvious implies we need to market D better.
Re:Adding ANSI C11 C compiler to D so it can import and comp... by WalterBright on Monday May 10, 2021 @03:04PM (#27109566)
I usually write D code using both GC and manually managed memory. Tension between the two is like which is better, a socket wrench or an end wrench? Most of the time you can make either wrench work, but sometimes ya just need one flavor. Even a clawfoot wrench now and then!