March 20, 2022

On Sunday, 20 March 2022 at 11:11:03 UTC, bachmeier wrote:

>

On Sunday, 20 March 2022 at 07:55:51 UTC, Ola Fosheim Grøstad wrote:

>

The other thread bachmeier referenced was particularly misleading for people who lack insight into how C++ is being used and how it evolves. When people complain about having the foundational underlying differences explained to them... you have to wonder if they themselves are insecure about their own choice, why would one otherwise care so much about C++? And why would one complain about having practical productivity concerns being expanded on?

Nonsense. Someone created a thread titled "The problem that took him 5 years to fix in C++, I solved in a minute with D". Paulo Pinto, who may or may not have written a line of D code used in production at some point in the last 20 years, responded with this:

>

Well, a language alone doesn't make ecosystems, D is a good language, but after 10 years doesn't hold a candle to CUDA, Metal, Unreal, SYSCL, AUTOSAR/MISRA certifications, iOS/Android/Windows SDK, High Energy Physics research, PyTorch/Tensorflow, LLVM/GCC, ....

Not only did he not respond to the post, he completely ignored it to talk about something unrelated. Then he later posted this:

>

D, well it has MIR and vibe.d, that is about it.

That's obviously wrong, but ultimately he succeeded at his goal of changing the discussion. And he did it without even pretending to engage with the original post.

I have indeed written a couple of lines in D, in case you are interested I have ported a compiler from Java to D, a low level memory allocator from C++ to D, and a few OpenGL demos.

Have I ever delivered any D into production?

It would be great, but that isn't what puts bread on the table, rather Java, C#, C++ is what customers ask for, and increasingly they are starting to occasionally also ask for Go and Rust knowledge as differentiation factor.

My critics of D, that you take so personally, are usually meant as a reality check for a language that I follow since Andrei has published his book.

All these years people keep comparing D to other languages, while in meantime the other languages got most of the features that made D innovative a decade ago, with an ecosystem that D will never have, yet keeps being ignored when bashing other languages for lack of D features.

Be assured I won't be stealing forum threads any more (to use your own words), it is clear it is a waste of my time and the audience here.

March 20, 2022

On Sunday, 20 March 2022 at 10:55:49 UTC, bachmeier wrote:

>

On Saturday, 19 March 2022 at 23:07:41 UTC, mee6 wrote:

>

On Saturday, 19 March 2022 at 20:05:52 UTC, bachmeier wrote:

>

On Saturday, 19 March 2022 at 17:43:16 UTC, mee6 wrote:

>

This just boils down to the standard libraries and what they implement. You can write that helper function put it in a util file and never have to write it again. D is considerably lacking when it comes to robust third party libraries. C++ has so many good libraries in comparison. For D you pretty much have to roll your own implementation for everything else. There isn't even basic @nogc containers, so there's a lot you end up having to write yourself. The allocators are experimental, not sure how long it's been now. So there isn't a design philosophy to follow, you'd be making it from the ground up and that's a lot more work than a simple utility function. It feels like it's just left unsolved, it feels that way for D a lot.

Excellent example of the off-topic vandalism of discussions I wrote about the other day. It always happens as soon as someone attempts to say something good about D.

Your response has nothing to do with the post. If I were in charge, I would delete it and ban you from posting here again. Not sure if this is an organized effort, but troll posts like this get tiring.

It's not off topic, your post is completely off topic ironically though. A comparison was made and I elaborated on that comparison. It seems you don't like it cause I was being critical of D.

You didn't engage at all with the topic of the post. You dismissed it with one sentence:

Yes I did, the whole paragraph is about the topic. I said the example given is something that can be a single function you use as a utility. This can be a single header file in C++. Once you write the function it can be used again and again. Now C++ isn't perfect so you have to write the code yourself but it's a relatively simple function to write. On the other hand D has a problem with much more difficult problems to write, just like the std library is a library, there aren't many third party libraries that are of good quality. Including the STD library itself, as it too is a library to be criticized. And then I give an example.

All the above information is there just compressed. Sorry I inferred a few common knowledge things I thought were common knowledge and I ended up writing it in a more compact form.

> >

You can write that helper function put it in a util file and never have to write it again.

Then you went on to talk about something else, in an attempt to change the topic completely - something that's the case with 100% of these posts. Either engage with the post, start your own thread, or post somewhere else. That's the way they do it most places on the internet.

They are related or are we not talking about a function or utility function in a library and we are talking about how one library doesn't have that utility function. Now just replace utility function with a class instead. It's basically the same thing, your just arguing a straw man argument to dismiss the criticism instead of just addressing the criticism.

March 20, 2022

On Sunday, 20 March 2022 at 13:50:54 UTC, Paulo Pinto wrote:
...

>

Be assured I won't be stealing forum threads any more (to use your own words), it is clear it is a waste of my time and the audience here.

I've enjoyed your writing and observations on a number of occasions and hope to see more in the future

In line, I believe, with many of your posts I can see a lot of good reasons to avoid D at this time: if you are a contractor, or work to support/extend a very large code base, or have conservative management, or prefer cut and paste development or ... then D is probably not for you.

OTOH, if you aim to disrupt then D could be a great choice.

March 20, 2022

On Sunday, 20 March 2022 at 14:56:45 UTC, Bruce Carneal wrote:

>

In line, I believe, with many of your posts I can see a lot of good reasons to avoid D at this time: if you are a contractor, or work to support/extend a very large code base, or have conservative management, or prefer cut and paste development or ... then D is probably not for you.

OTOH, if you aim to disrupt then D could be a great choice.

I don't think a language has to be commercially viable for corporations in order to be interesting to use, but Paolo is spot on when it comes to D having lost direction and falling behind…

It is better to just say that competing head-to-head with C++ is not a goal than to give the impression that it is while spending time on things that doesn't provide any advantages for existing C++ programmers (e.g. weird string interpolation etc) and also not having a clear plan for reaching parity with C++17. If D ever gets there with this lack of focus you'll be up against C++26 when D has the C++17 features set and you will stil not be able to win over C++ programmers.

But is totally fair to create something in a direction completely different from where C++ is heading, if that is more interesting to the D designers, but then they should forget everything they think they know about C++ and create something novel.

In general, there are too many languages now that are almost-the-same, so if going head-to-head with C++ isn't realistic/fun… then stake out a niche that isn't already filled with other languages.

(my personal opinion is that going for per-actor-gc and ARC could be interesting enough to create a distance to most other languages).

March 21, 2022

On Sunday, 20 March 2022 at 11:11:03 UTC, bachmeier wrote:

>

On Sunday, 20 March 2022 at 07:55:51 UTC, Ola Fosheim Grøstad wrote:

>

The other thread bachmeier referenced was particularly misleading for people who lack insight into how C++ is being used and how it evolves. When people complain about having the foundational underlying differences explained to them... you have to wonder if they themselves are insecure about their own choice, why would one otherwise care so much about C++? And why would one complain about having practical productivity concerns being expanded on?

Nonsense. Someone created a thread titled "The problem that took him 5 years to fix in C++, I solved in a minute with D". Paulo Pinto, who may or may not have written a line of D code used in production at some point in the last 20 years, responded with this:

>

Well, a language alone doesn't make ecosystems, D is a good language, but after 10 years doesn't hold a candle to CUDA, Metal, Unreal, SYSCL, AUTOSAR/MISRA certifications, iOS/Android/Windows SDK, High Energy Physics research, PyTorch/Tensorflow, LLVM/GCC, ....

Not only did he not respond to the post, he completely ignored it to talk about something unrelated. Then he later posted this:

>

D, well it has MIR and vibe.d, that is about it.

That's obviously wrong, but ultimately he succeeded at his goal of changing the discussion. And he did it without even pretending to engage with the original post.

I think Paulo and others are responding to the underlying statement that the OP was trying to say, that D is better than C++ and this is why we should prefer D over C++
(Atleast that's what I inferred)

They point out that feature superiority does not compensate for the ecosystem fragility(I'm not saying this, that just seems to be the sentiment echoed by them)

It's a little frustrating to read, but one can just gloss over if they don't want a dose of negativity(or "reality", I guess).

March 21, 2022

On Monday, 21 March 2022 at 13:36:47 UTC, Tejas wrote:

>

They point out that feature superiority does not compensate for the ecosystem fragility

You cannot point to individual features (and especially not make assumptions about a feature that was added in C++20) and claim that it is somehow significant. You have to look at the whole package and how the features play together for a specific use case. Whether the eco system matters or not also depends on the use case (in many C++ scenarios you don't build on many external libraries, so that may or may not be significant, depends on the context).

You might argue that string mixin is a superior feature. Although that feature makes code much less maintainable (read the source code for the D standard library and you'll see why), so whether you classify that as an advantage or a way to aggregate debt and increase costs over the project life-time depends on whether you write larger programs that are maintained over a long period of time or not.

In the real world language-specific features have little impact on application development unless you use them to a large extent. Does anyone have a list of usage scenarios for compile time strings without string mixins that would motivate a programmer to shift to another language to get it? I've never had the need for it outside string mixins, so I would argue that how features play together typically is more important than any individual feature.

Right now, D lacks basic things that C++ programmers would expect, so if you want to sway them to switch over it is rather pointless to point at things they rarely need, or that they can implement in a few hours, or that is in the pipeline for C++23/C++26.

You need to point to a plan for how D is going to address those features they feel lacking.

Or, given the stagnation of D, it might be much better to stop focusing on C++ and do something completely different from what C++ does.

March 21, 2022

On Monday, 21 March 2022 at 15:23:21 UTC, Ola Fosheim Grøstad wrote:

>

Does anyone have a list of usage scenarios for compile time strings without string mixins that would motivate a programmer to shift to another language to get it?

Stealing a bit of Symmetry Investments prototype code I'm currently working on to demonstrate.

template addMonthsStick(DateType) {
    @SILdoc("Adds m number of months"
        ~ " to a " ~ __traits(identifier, DateType)
        ~ "[snip the rest of doc description]"
    )
    DateType addMonthsStick(DateType arg, long m) {/*...*/}
}

IOW, generating documentation for Symmetry Integration Language function at compile time.

Also, https://code.dlang.org/packages/pegged. While it works with string mixins, you can also make a separate program to generate the parser for your main project. That way you avoid having the compiler processing the PEG over and over again at compile time.

March 21, 2022

On Monday, 21 March 2022 at 16:07:44 UTC, Dukc wrote:

>
template addMonthsStick(DateType) {
    @SILdoc("Adds m number of months"
        ~ " to a " ~ __traits(identifier, DateType)
        ~ "[snip the rest of doc description]"
    )
    DateType addMonthsStick(DateType arg, long m) {/*...*/}
}

IOW, generating documentation for Symmetry Integration Language function at compile time.

Ok, so you use it to access reflection within the compiler instead of using "compiler as a library".

>

Also, https://code.dlang.org/packages/pegged. While it works with string mixins, you can also make a separate program to generate the parser for your main project. That way you avoid having the compiler processing the PEG over and over again at compile time.

Not sure why you would do this as a compile time evaluation if you run it separately anyway?

Both these use cases are what I would consider "auxiliary usage" and not so much relevant for building libraries IMO, although being able to extract information using reflection is nice workaround if you don't have access to an "compiler as a library" feature.

March 22, 2022

On Thursday, 17 March 2022 at 16:56:12 UTC, kdevel wrote:

>

What if the program has got an already open socket (int) s or an open File f. How easily are the remaining bytes "slurped" in those cases?

Read all data from file descriptor:

File f;
f.fdopen(STDIN_FILENO, "rb");
auto inbuffer = f.byChunk(4096).join;
1 2 3
Next ›   Last »