I advise training programmers instead of throwing them in front of a screen without any training. Companies these days provides no training at all. When I was hired over 40 years ago, I spent plenty of time being trained for my first 3 months. Now, nothing, and you if you want to train a new person, you do it on your own time.
The Case for Memory Safe Roadmaps
211–220 of 427 posts
Re: The Case for Memory Safe Roadmaps
#212Can someone explain why we can't double-down on C++ and, through compiler wizardry and reduction in toolset (say, strings can only be fixed-size at 32 chars, 64, or 256 long. No raw pointers, allocator zeroes out all freed memory), achieve a memory-safe language? Obviously, making certain concessions would be a deal-breaker for some, but it might be viable for legacy codebases. If you were to try to make C++ memory-s…
Btw I don’t know how this works in most languages, but circular references can be still a problem even with these restrictions. (If I remember well dangling references can be more or less handled, but correct me if I’m wrong. I remember that JavaScript definitely had problem with those)
Re: The Case for Memory Safe Roadmaps
#213Earlier quoted context omitted.
Ada people scratching their heads....
Neither Ada nor Rust are completely memory-safe... and they are partially unsafe in completely different ways. But I guess people prefer the Rust explicitness.
Re: The Case for Memory Safe Roadmaps
#214But how are we going to trade stocks in nano seconds without C++?!
High speed fiance is mostly done in Java and Haskell, because mistakes are expensive. (And yeah, it's one of the very few fields that Haskell enters the list.)
Their podcast titled "Signals and Threads" is quite interesting.
Re: The Case for Memory Safe Roadmaps
#215Earlier quoted context omitted.
That’s just a customer with requirements.. like all customers.
But, on the other hand it’s not. The government is a virtual monopsony. One customer has unappealing requirements and you can choose not to serve them. The federal government saying don’t hire c devs will hurt c devs. C devs will be understandably dismayed by this.
Re: The Case for Memory Safe Roadmaps
#216"Undefined behavior" in general is a nightmare. After memory safety, the next target should be the enforcement of underflow/overflow trapping. With the exception of the intentional use to implement modular arithmetic, underflow/overflow should always be an error condition.
There's also explicit arithmetic functions that let you choose your overflow behavior:
* Checked: return None on overflow
* Wrapping: two's compliment wrapped overflow (the "overflowing" variant gives you a carry bit)
* Saturating: return maximum value on overflow
Re: The Case for Memory Safe Roadmaps
#217I advise training programmers instead of throwing them in front of a screen without any training. Companies these days provides no training at all. When I was hired over 40 years ago, I spent plenty of time being trained for my first 3 months. Now, nothing, and you if you want to train a new person, you do it on your own time.
Startups are likely to fail, big tech is likely to fire the developer (or they quit), and poorly run companies just don't know how to train. End result is it just doesn't happen much anymore.
Re: The Case for Memory Safe Roadmaps
#218Earlier quoted context omitted.
>Really, the only memory unsafe languages still in use are C and C++. Ada, Fortran, assembly?
Isn't Ada memory-safe?
Re: The Case for Memory Safe Roadmaps
#219Earlier quoted context omitted.
what do we do about javascript?
Write javascript engines in memory safe languages. I'd vote for rust as rust and javascript's APIs are pretty similar in style, structure, consistency and security/other issues that are not memory safety. On that note, try valgrind on existing javascript engines, you might be "entertained". (I certainly was, but that was some years back.
Re: The Case for Memory Safe Roadmaps
#220Correct me if I'm wrong... But don't these types of memory attacks require local access to the machine?