D not considered memory safe
aberba
karabutaworld at gmail.com
Mon Jul 8 07:23:44 UTC 2024
On Saturday, 6 July 2024 at 23:39:54 UTC, Sebastian Nibisz wrote:
> On Saturday, 6 July 2024 at 23:10:02 UTC, Walter Bright wrote:
>> On 7/6/2024 4:07 AM, Sebastian Nibisz wrote:
>>> Seriously? Any language is safe in this case, you just need
>>> to write safe code.
>>
>> Enabling the checks is quite different from writing code with
>> no bugs in it.
>
> But you have to remember to enable it. Inexperienced programmer
> usually won't do this and will build unsafe code unconsciously.
I've heard this argument about the "inexperienced programmer"
many times. Folks assume inexperienced programmers are writing
some kernel code or deploying to some mission critical system. I
see an inexperienced programmer writing any such code anytime
soon. They could care less about these things you're talking
about and they'd be using the GC (not that GC is a beginner
target feature). Many of the traditional languages suggested to
beginners such as C, C++, Python, JavaScript, PHP don't work like
rust.
I'm not arguing writing memory unsafe code should be encouraged,
I'm saying in reality, it's not a problem for the beginner. You
can still write bugs causing vulnerabilities in any language.
Have you considered the cons of dealing with @safe code?
More information about the Digitalmars-d
mailing list