Thoughts on replacement languages (Reddit + D)

via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 11 12:02:27 PST 2015


On Sunday, 11 January 2015 at 19:38:12 UTC, bearophile wrote:
> ponce:
>
>> Rust is supposed to replace C++, and it happens working in C++ 
>> since years, I can't help but notice we actually have very few 
>> memory safety problems,
>
> Are you always able to detect them?

When Intel MPX comes you should be able to in debug builds, since 
you then supposedly cache the bounds for all mallocs. It 
basically attaches bounds to every pointer with a hardware 
mechanism for lookups. And you can turn it off at runtime, which 
turns the MPX instructions into NOP. So you can basically deploy 
an application with MPX builtin and tell a customer to turn on 
MPX if there is a problem that is suspected to be memory related.

But keep in mind that linear typing also affords safer 
multi-threading and removes doubts about aliasing which can 
prevent optimization... How important is it? Time will show && 
YMMV.


More information about the Digitalmars-d mailing list