March 10, 2022

On Thursday, 10 March 2022 at 12:23:23 UTC, Mike Parker wrote:

>

On Thursday, 10 March 2022 at 11:50:05 UTC, Ola Fosheim Grøstad wrote:

>

Because negative advertising doesn't work, it is negative and will be perceived as whining.

Advertising? This is a community forum, where community members express personal opinions. There's nothing wrong with discussions about the pros and cons of different programming languages as long as they're civil. I'm not about to tell people to never say anything negative about any language, including those same people who keep popping to remind us of D's shortcomings every time one of these discussions appears.

It wouldn't be so bad if they were making good points. It's not productive to counter with "D isn't good at X" where X is neither on topic or relevant to the vast majority of programmers. It's an emotional response to someone pointing out weaknesses in C++. We'd all be better off if they'd stay in their C++ bubble and not vandalize otherwise interesting discussions.

March 10, 2022

On Thursday, 10 March 2022 at 14:02:20 UTC, bachmeier wrote:

>

On Thursday, 10 March 2022 at 12:23:23 UTC, Mike Parker wrote:

>

On Thursday, 10 March 2022 at 11:50:05 UTC, Ola Fosheim Grøstad wrote:

>

Because negative advertising doesn't work, it is negative and will be perceived as whining.

Advertising? This is a community forum, where community members express personal opinions. There's nothing wrong with discussions about the pros and cons of different programming languages as long as they're civil. I'm not about to tell people to never say anything negative about any language, including those same people who keep popping to remind us of D's shortcomings every time one of these discussions appears.

It wouldn't be so bad if they were making good points. It's not productive to counter with "D isn't good at X" where X is neither on topic or relevant to the vast majority of programmers. It's an emotional response to someone pointing out weaknesses in C++. We'd all be better off if they'd stay in their C++ bubble and not vandalize otherwise interesting discussions.

This is one of the most spectacular cases of off-topic vandalization of a forum discussion, in a thread announcing Facebook had started using D in production:

https://forum.dlang.org/post/wllaccthfrnvquuhsbsr@forum.dlang.org

March 10, 2022

On Thursday, 10 March 2022 at 13:33:09 UTC, Basile B. wrote:

>

is it how you would describe yourself ?

I am a learner.

D is a minority language. Only those who dare to try it will get its benefits.
D should try to satisfy excellent programmers.
Make excellent programmers comfortable and let them show off the D language.

March 10, 2022

On Thursday, 10 March 2022 at 13:54:48 UTC, Mike Parker wrote:

>

So every discussion on this forum should be about improving D and nothing else? Come on. We have plenty of discussions about that.

No, but there is way too much bashing of other languages, usually by people with a very limited knowledge of those languages and their primary usage scenarios. It looks bad and doesn't win anyone over.

Referencing other languages is only interesting if there is something you want to learn from them. There are thousands of languages with flaws, should we list them all? Makes no sense to me. Just makes the forums look juvenile.

March 10, 2022
Hi again,

Well I'll reply myself instead of making individual responses to not pollute this topic too much, but overall I see some people complaining that I was bashing C++, and all can I say it was NOT on purpose.

I was just pointing out one case that was in fact very embarrassing in my opinion.

This video is from Jason and he is well known on the C++ community and even gave some presentations on CppCon, so it was amusing seeing him struggling with the language for something that I could do easily in D (Again I'm not a D hardcore at all).

I think that differently from some people here I like D's GC, I never had much problem with it (Knocking on the wood), and even that I don't use much templates I prefer the D way in contrast with C++ and I could go on with this, but I think you get the gist.

I usually watch videos from CppCon from time to time to see what's new, and to be honest most of the new features presented there for me seems to be clumsy or overwhelmingly painful to work with and not so simple compared with D.

On Thursday, 10 March 2022 at 08:30:06 UTC, Walter Bright wrote:
> ...
> P.S. I sent you email about this, but your email address doesn't work.

First sorry for that, but this is true and the reason is just to avoid spam, I post from the forum.dlang.org and while I don't know if this still the case, but there was a time in the past where the e-mail address was being leaked and could be found through google, so I use a random one just to post.

Matheus.

PS: I'm a ESL, sorry for any English mistake.
March 10, 2022
On Thursday, 10 March 2022 at 14:34:44 UTC, Ola Fosheim Grøstad wrote:
> No, but there is way too much bashing of other languages, usually by people with a very limited knowledge of those languages and their primary usage scenarios. It looks bad and doesn't win anyone over.

My main programming language is C and I admit that I have a limited knowledge in C++ and even in D (Remember I use D as super C), but I can see like many other comments on that same video, that the whole thing was overwhelmingly painful, Period.

Like I said above, that guy on the video is well known on C++ community and seeing him struggling with this feature made me wonder how a newcomer would feel?

> Referencing other languages is only interesting if there is something you want to learn from them.

Oh, but there is something to learn here, that in this regard C++ is a lot painful compared to D.

By the way let just remember the title of the video: "The `constexpr` Problem That Took Me 5 Years To Fix!"

That must be a hint.

Matheus.
March 10, 2022
On Thursday, 10 March 2022 at 06:44:47 UTC, Paulo Pinto wrote:
>
> The way I see it, C# 10 and C++ 20 have mostly catched up in where D was 10 years ago, Rust and Go have found out a way to push them into devs regardless of what they think about them, thanks all those Cloud Native Foundation projects, Khronos is slowly adopting Rust alongside C++ on some of their ongoing standard discussions.

Funny how a positive thread about D could become so negative quickly.

C# does not have any meta programming as for this date, only generics so that language doesn't apply (still C# is a good language in my opinion). C++20 might have better modelling power than D right now but I would say in practice D is still more powerful because the meta programming syntax is more accessible for the average programmer. Meta programming in C++ is still a kind of academic hair-splitting which also requires the programmer to spend a lot of time to learn and understand it. Obviously even experts have problems with it which this thread is about.

I think that one goal for D should be, can you write a function then you can do meta programming. If you think that D meta programming has flaws and can be improved, then it should be discussed in a new thread for each suggested improvement.
March 10, 2022

On Thursday, 10 March 2022 at 14:50:31 UTC, matheus wrote:

>

Like I said above, that guy on the video is well known on C++ community and seeing him struggling with this feature made me wonder how a newcomer would feel?

C++ is not friendly to beginners, and never will be. That is a well known fact.

> >

Referencing other languages is only interesting if there is something you want to learn from them.

Oh, but there is something to learn here, that in this regard C++ is a lot painful compared to D.

Yes, D had the opportunity to learn from C++, yet there are more improvements useful for meta-programming in C++ release by release. So unless D starts to improve it is only a matter of time until that advantage is lost.

>

By the way let just remember the title of the video: "The constexpr Problem That Took Me 5 Years To Fix!"

constexpr is relatively new, not a done deal, and they improve on it iteratively based on usage experience. The usage setting is core to understanding language evolution. The evolution of C++ is very conservative and that is intentional.

March 10, 2022
On Thursday, 10 March 2022 at 15:02:43 UTC, IGotD- wrote:
> On Thursday, 10 March 2022 at 06:44:47 UTC, Paulo Pinto wrote:
>>
>> The way I see it, C# 10 and C++ 20 have mostly catched up in where D was 10 years ago, Rust and Go have found out a way to push them into devs regardless of what they think about them, thanks all those Cloud Native Foundation projects, Khronos is slowly adopting Rust alongside C++ on some of their ongoing standard discussions.
>
> Funny how a positive thread about D could become so negative quickly.
>
> C# does not have any meta programming as for this date, only generics so that language doesn't apply (still C# is a good language in my opinion). C++20 might have better modelling power than D right now but I would say in practice D is still more powerful because the meta programming syntax is more accessible for the average programmer. Meta programming in C++ is still a kind of academic hair-splitting which also requires the programmer to spend a lot of time to learn and understand it. Obviously even experts have problems with it which this thread is about.
>
> I think that one goal for D should be, can you write a function then you can do meta programming. If you think that D meta programming has flaws and can be improved, then it should be discussed in a new thread for each suggested improvement.

C# metaprogramming is called T4 templates, Roslyn plug-ins, compiler attributes, reflection and code generators.

Are they clunkier than D?

Surely, however C# comes with Unity (what happened to Remedy?), Orleans, CUDA (including GPGPU debugging), IoT (Meadows), Cloud SDKs for GCP/AWS/Azure, Blazor, Uno, MAUI,....

D, well it has MIR and vibe.d, that is about it.
March 10, 2022
On Thursday, 10 March 2022 at 02:01:01 UTC, matheus wrote:
> Hi,
>
> Today someone sent me this video: https://www.youtube.com/embed/ABg4_EV5L3w
> (C++ Weekly - Ep 313 - The `constexpr` Problem That Took Me 5 Years To Fix!).
>
> It's a 26 minute long video of a guy trying to generate a concatenated string during CT in C++.
>
> I was flabbergasted by the problems this poor guy had in front of him for a thing that shouldn't seem so complex (In my opinion of course). And more yet that he has being struggling with this for 5 years.
>
> So I decided to try the same with D, it was 14 lines[1] of code written in less than a minute and it just worked on the first try. Then I looked the Assembly code:
>
> .L.str:
>         .asciz  "hello world, hello world, hello world, "
>
> After that I even asked over the D IRC channel if it was just this? And a user confirmed that my string was being generated through CT as the Assembly indicated.
>
> Again incredible. My first programming language was C, then in 2000-ish I had my first contact with C++ and I just hated and went back to C and then while looking for alternatives I stumbled on D which I use till this day as a "super C".
>
> But now after so many years I couldn't believe the C++ is still struggling even to this day with this type of thing.
>
> I'd like to quote this comment from the video:
>
>> meowsqueak:
>> "Well done solving this puzzle, but I’m left in shock. The need to employ a template, static constexpr variables, a lambda function, and four utility functions just to compile-time generate a static string in C++ is an embarrassment."[2]
>
> And indeed it is an embarrassment. Well D may have it flaws but I always found it lot time better or less restrictive language compared to others, especially C++.
>
> Finally I'd like to take this moment and thank for all the effort.
>
> Matheus.
>
> [1] - Here is the snippet I wrote: https://godbolt.org/z/MsT36Prx4
> [2] - Youtube comment: https://www.youtube.com/watch?v=ABg4_EV5L3w&lc=Ugzb7kTLS8GNS9bK07F4AaABAg
>
> PS: I'm a ESL, sorry for any English mistakes.

`~`