July 20
On Saturday, 20 July 2024 at 05:58:19 UTC, Richard (Rikki) Andrew Cattermole wrote:
> We either get the DFA I'm building, something like it or we're toast in commercial usage.

What is DFA?
July 21
On 21/07/2024 12:57 AM, ryuukk_ wrote:
> On Saturday, 20 July 2024 at 05:58:19 UTC, Richard (Rikki) Andrew Cattermole wrote:
>> We either get the DFA I'm building, something like it or we're toast in commercial usage.
> 
> What is DFA?

Dataflow analysis.
July 21
On Saturday, 20 July 2024 at 05:58:19 UTC, Richard (Rikki) Andrew Cattermole wrote:
>
> It is not if, but when will D be banned from being used in critical or long standing applications.

Dont fall for political memes; while nist/cia holds allot of sway over the tech ecosystem, its not total and irresponsible. They can put money in, and ask nicely for programmers to use rust; it wont go over well if they mandate it.

July 21
On 7/19/2024 4:33 PM, H. S. Teoh wrote:
> In other news, this is yet another nail in the coffin of memory-unsafe
> languages. We're slowly, but surely inching towards the day when the
> likes of C and C++ will finally be relegated to the dustbin of
> history...

It wasn't a memory unsafe error. It was a failure to deal with a program that self-detected a fault and exited.

There are many kinds of hardware exceptions. The default behavior of them is to exit the program. The default behavior can be overridden with a handler that can then do whatever the programmer needs to happen (like restart, or engage the backup, or shut down gracefully).

It's not different than failing to catch a thrown C++ exception - the default is exit the program.

July 21
On 7/20/2024 4:37 AM, Basile B. wrote:
> There's gonna be a lot of discussion about "use optional types", "nullable types are the evil", etc. In my opinion the problem is more a lack of code instrumentation. In styx you can instrument the code so that 'every fucking damn GEP' ("member access" for the profans) is checked against null. Same for member functions calls. It's very costly but that helps much.

What happens, then, with optional types and you've got an unexpected null that the program was not designed for?

Probably exit the program.

The same thing that an uncaught null exception does. You can write an exception handler to intercept them, and do whatever you want.

July 21
On 7/19/2024 3:49 PM, mw wrote:
> It was a NULL pointer from the memory unsafe C++ language.

https://stackoverflow.com/questions/2663456/how-to-write-a-signal-handler-to-catch-sigsegv

July 21
On Saturday, 20 July 2024 at 05:58:19 UTC, Richard (Rikki) Andrew Cattermole wrote:
>
> On 20/07/2024 11:33 AM, H. S. Teoh wrote:
>> On Fri, Jul 19, 2024 at 10:49:23PM +0000, mw via Digitalmars-d wrote:
>>> [...]
>> [...]
>> 
>> It's 2024, and a NULL pointer brought down half the world's servers.
>> 
>> Just gives you *so* much confidence in technology. :-D
>> 
>> //
>> 
>> In other news, this is yet another nail in the coffin of memory-unsafe
>> languages. We're slowly, but surely inching towards the day when the
>> likes of C and C++ will finally be relegated to the dustbin of
>> history...
>> 
>> 
>> T
>
> It is not if, but when will D be banned from being used in critical or long standing applications.

Can't critical applications be written with @safe turned on? How does D fall short in that regard?

July 22
On 22/07/2024 5:31 AM, aberba wrote:
> On Saturday, 20 July 2024 at 05:58:19 UTC, Richard (Rikki) Andrew Cattermole wrote:
>>
>> On 20/07/2024 11:33 AM, H. S. Teoh wrote:
>>> On Fri, Jul 19, 2024 at 10:49:23PM +0000, mw via Digitalmars-d wrote:
>>>> [...]
>>> [...]
>>>
>>> It's 2024, and a NULL pointer brought down half the world's servers.
>>>
>>> Just gives you *so* much confidence in technology. :-D
>>>
>>> //
>>>
>>> In other news, this is yet another nail in the coffin of memory-unsafe
>>> languages. We're slowly, but surely inching towards the day when the
>>> likes of C and C++ will finally be relegated to the dustbin of
>>> history...
>>>
>>>
>>> T
>>
>> It is not if, but when will D be banned from being used in critical or long standing applications.
> 
> Can't critical applications be written with @safe turned on? How does D fall short in that regard?

That covers non-lifetime, non-segfault, and non-assert issues.

Unfortunately you cannot rely on using things like signal handlers to throw an exception, as you may not own the thread let alone the process to have one.

Asserts/boundchecks/null deref these things cannot bring down the process.

This includes for web services too.

Imagine trying to explain to somebody that they lost 100k in sales because the web server they were connected to segfaulted out because it was written in D and not in an application VM language like Java. It would go down very well!
July 21
On Sunday, 21 July 2024 at 17:39:23 UTC, Richard (Rikki) Andrew Cattermole wrote:
> On 22/07/2024 5:31 AM, aberba wrote:
>> [...]
>
> That covers non-lifetime, non-segfault, and non-assert issues.
>
> Unfortunately you cannot rely on using things like signal handlers to throw an exception, as you may not own the thread let alone the process to have one.
>
> Asserts/boundchecks/null deref these things cannot bring down the process.
>
> This includes for web services too.
>
> Imagine trying to explain to somebody that they lost 100k in sales because the web server they were connected to segfaulted out because it was written in D and not in an application VM language like Java. It would go down very well!

@live?
July 22
On 22/07/2024 5:42 AM, aberba wrote:
> On Sunday, 21 July 2024 at 17:39:23 UTC, Richard (Rikki) Andrew Cattermole wrote:
>> On 22/07/2024 5:31 AM, aberba wrote:
>>> [...]
>>
>> That covers non-lifetime, non-segfault, and non-assert issues.
>>
>> Unfortunately you cannot rely on using things like signal handlers to throw an exception, as you may not own the thread let alone the process to have one.
>>
>> Asserts/boundchecks/null deref these things cannot bring down the process.
>>
>> This includes for web services too.
>>
>> Imagine trying to explain to somebody that they lost 100k in sales because the web server they were connected to segfaulted out because it was written in D and not in an application VM language like Java. It would go down very well!
> 
> @live?

Within a function body that provides spatial memory lifetime guarantees.

That is the easy part, its inter-function which is the hard part and it does not attempt to solve that.

I.e. storing a pointer into some objects and knowing that you have the only access to it, and if you extract it you have the only value of it.