October 29

On Sunday, 29 October 2023 at 18:20:40 UTC, monkyyy wrote:

>

On Sunday, 29 October 2023 at 18:12:46 UTC, Abdulhaq wrote:

>

C++ is the low risk option, for a typical business

That seems dubious, theres also talk of c++ dying, c++ has super long compile times and maybe you use a feature that steps onto a landmine of those hours compiling. And as hard as making a compiler with your subset of d is, making a compiler for c++ seems all that much worse.

Yes reasonable people can certainly differ on this, but the vast majority of businesses that are using C++ do not need to maintain a C++ compiler/ecosystem. We are considering a business that thinks it would need to maintain a D compiler/ecosystem if it were to choose D for their business.

October 29

On Sunday, 29 October 2023 at 18:12:46 UTC, Abdulhaq wrote:

>

C++ is the low risk option, for a typical business, because it will still be around in 20 years, it will be well maintained, you will always be able to find a pool of developers who can maintain your code, it will link and compile with thousands of industry standard libraries, frameworks, protocols, hardware platforms.

So D is higher risk in that you may find yourself having to spend time (and much money) coding up your own libraries and hardware support. In 10 years time you might struggle to find D developers. However, the reward with D is that you can achieve the required functionality, over the next few years, much more quickly (i.e. more cheaply) than with C++.

There's a lot of speculation in those two paragraphs. The risk with D (using your definition of risk) is non-zero, but not much greater than zero. If nobody is using D in ten years, which is a very low probability scenario, you can compile the existing D codebase and call it from C++ just like you'd call any C code.

While C++ will be around in 20 years, the cost of maintaining the code could be high enough that it's not worth it. A real danger with C++ is that it's not the first choice of new developers. In 20 years you might be competing for talent with the finance industry. That's a battle few companies are going to win.

You're also ignoring everything that takes place from now until 2043. Higher cost of code development and maintenance is quite a liability to ignore as "not a risk".

October 29

On Sunday, 29 October 2023 at 18:33:05 UTC, bachmeier wrote:

>

On Sunday, 29 October 2023 at 18:12:46 UTC, Abdulhaq wrote:

>

There's a lot of speculation in those two paragraphs. The risk with D (using your definition of risk) is non-zero, but not much greater than zero. If nobody is using D in ten years, which is a very low probability scenario, you can compile the existing D codebase and call it from C++ just like you'd call any C code.

While C++ will be around in 20 years, the cost of maintaining the code could be high enough that it's not worth it. A real danger with C++ is that it's not the first choice of new developers. In 20 years you might be competing for talent with the finance industry. That's a battle few companies are going to win.

You're also ignoring everything that takes place from now until 2043. Higher cost of code development and maintenance is quite a liability to ignore as "not a risk".

Yes it is a lot of speculation, but I think these are the sorts of issues that need to be considered when making these decisions. There are so many real variables that it all just amounts to broad guesses, but better than nothing. And each person will weigh the factors according to their own experiences.

October 29
On Sunday, 29 October 2023 at 18:20:28 UTC, Walter Bright wrote:
> On 10/29/2023 5:54 AM, Imperatorn wrote:
>> However, we are becoming unsure if D is really an option for us given the response we got trying to making almost the smallest change imaginable to phobos (changing a single word).
>
> What is that change?

Nevermind, it was just exposing the TaskStatus enum. But it turned out that the property taskStatus that contained the value for it was not supposed to be exposed either, and the AbstractTask was just a "temporary" fix back in 2011, and also taskStatus was being accessed by alias this.

A bug report has been created for it by schveiguy since I can't access bugzilla because of an intermittent DNS problem.

Next step is to provide a safe way to get the task status after the pr has been merged.
October 29

On Sunday, 29 October 2023 at 18:20:40 UTC, monkyyy wrote:

>

On Sunday, 29 October 2023 at 18:12:46 UTC, Abdulhaq wrote:

>

C++ is the low risk option, for a typical business

That seems dubious, theres also talk of c++ dying, c++ has super long compile times and maybe you use a feature that steps onto a landmine of those hours compiling. And as hard as making a compiler with your subset of d is, making a compiler for c++ seems all that much worse.

Yes, we don't consider C++ a safe choice.

October 29
On 10/29/2023 11:38 AM, Imperatorn wrote:
> A bug report has been created for it by schveiguy since I can't access bugzilla because of an intermittent DNS problem.

And a PR:

https://github.com/dlang/phobos/pull/8834


> Next step is to provide a safe way to get the task status after the pr has been merged.

October 29
On Sunday, 29 October 2023 at 20:39:19 UTC, Walter Bright wrote:
> On 10/29/2023 11:38 AM, Imperatorn wrote:
>> A bug report has been created for it by schveiguy since I can't access bugzilla because of an intermittent DNS problem.
>
> And a PR:
>
> https://github.com/dlang/phobos/pull/8834
>
>
>> Next step is to provide a safe way to get the task status after the pr has been merged.

Yes, it's great to see. Now the next step is to improve it so that you can get the task status safely 😎
October 29
On Sunday, October 29, 2023 3:03:00 PM MDT Imperatorn via Digitalmars-d wrote:
> On Sunday, 29 October 2023 at 20:39:19 UTC, Walter Bright wrote:
> > On 10/29/2023 11:38 AM, Imperatorn wrote:
> >> A bug report has been created for it by schveiguy since I can't access bugzilla because of an intermittent DNS problem.
> >
> > And a PR:
> >
> > https://github.com/dlang/phobos/pull/8834
> >
> >> Next step is to provide a safe way to get the task status after the pr has been merged.
>
> Yes, it's great to see. Now the next step is to improve it so that you can get the task status safely 😎

You have yet to explain why that information should be made public. Even if you can get the task status without breaking thread-safety, the information is still likely to be out-of-date by the time you actually try to do anything based on it, because once you have the state information out of the Task, that state information is no longer synchronized across threads. It's just a copy of what the state was when the state was copied across threads. So, actually making it possible to get the state information in a thread-safe manner doesn't fix the problem that trying to do anything based on that information involves race conditions.

And none of the functions on the Task are designed in such a way that it really makes sense to call them or not based on whether a task has started or not. The design of std.parallelism very purposefully only exposed the status of whether the task is done or not, because that's really the only actionable state information with the set of functions that it provides.

In general, trying to do anything based on whether the task has started or not is going to be subject to race conditions unless what you're trying to do is actually built into the Task like the *Force functions are.

So, the question is what problem are you trying to solve by making the task status public? What does that enable that you cannot currently do without that information?

If you have a good use case, then it may make sense to expose the state information, but as was pointed out in your previous PR, exposing that state information is likely to mislead programmers and risk causing them to write code that has race conditions due to out-of-date state information - and no one reviewing the PR saw how exposing that state information would actually enable anything. So, please provide a use case where exposing that state information actually enables something that you can't do without it.

- Jonathan M Davis




October 29
On Sunday, 29 October 2023 at 21:32:18 UTC, Jonathan M Davis wrote:
> On Sunday, October 29, 2023 3:03:00 PM MDT Imperatorn via Digitalmars-d wrote:
>> [...]
>
> You have yet to explain why that information should be made public. Even if you can get the task status without breaking thread-safety, the information is still likely to be out-of-date by the time you actually try to do anything based on it, because once you have the state information out of the Task, that state information is no longer synchronized across threads. It's just a copy of what the state was when the state was copied across threads. So, actually making it possible to get the state information in a thread-safe manner doesn't fix the problem that trying to do anything based on that information involves race conditions.
>
> [...]

Because it would be wonderful. I could use it to draw a rainbow on the screen.
October 30

On Sunday, 29 October 2023 at 12:58:28 UTC, Paul Backus wrote:

>

On Sunday, 29 October 2023 at 12:54:33 UTC, Imperatorn wrote:

>

However, we are becoming unsure if D is really an option for us given the response we got trying to making almost the smallest change imaginable to phobos (changing a single word).

The product manager (who has a programming background) is very concerned.

Can we count on that if we find an issue with D that it will be taken care of? And if so, how, and by whom? That it will not be silently ignored for years? How can we safeguard against that?

It sounds like you should probably get in touch with the D Language Foundation about this. Mike Parker, who posts the DLF meeting updates in the Announce forum, should be able to connect you with the right people.

Thanks, I got in contact with him now 👍