@smari @yaelwrites It never appeared like that to me - the Rust approach is that as long as the code is not `unsafe`, Rust statically guarantees:
- No data races (Send/Sync)
- No use after free
- No unsafe pointers of any kind
basically https://en.wikipedia.org/wiki/Rust_(programming_language)#Memory_safety
@monad_cat @yaelwrites to be clear, I'm not hating on Rust. I'm just being (perhaps excessively) formalistic because it's such a big claim.
That said, I don't really enjoy using it - because the enforcement of these safety measures isn't done by the compiler, but by the programmer by being forced to jump through inane semantic hurdles. 😅
I do, to the point that coding python feels wrong, or like cheating. I'm not exactly doing it for a living, but I do genuinely enjoy coding in rust.
@smari @monad_cat @yaelwrites my (limited) experience is that every time rust has been annoying, the thing i wanted to do would have been a subtle bug in c{,++}. so i'm left with the impression that the programmer is supposed to jump through those hurdles in these languages anyway, just no one's checking if you actually are
but this is also why i'm writing a game in lua now
@yaelwrites seems strange that Python and even ADA Spark are missing in the example recommendations: https://www.adacore.com/papers/safe-dynamic-memory-management-in-ada-and-spark
Also I thought that Rust trademarks are now with the Rust foundation: https://foundation.rust-lang.org/policies/logo-policy-and-media-guide/
@yaelwrites those are pretty nice, yes 🙂
I got into the details while reading, because the big picture was "yupp, sounds good".
@yaelwrites see Java Security 1996
Java Security https://a.co/d/8aQYrZ7
“Breaking News: NSA finally reads decades-old programming language security research” 😃.
At this point it seems this advice boils down to:
“Use a runtime garbage collected language or Rust” Or the inverse: “Don’t use C, C++, or assembly, or any other language with unchecked pointer access”
@yaelwrites
💯 I agree. (And +1 to sandboxes)
I just can’t help chuckling at the situation: An organization, typically considered at the bleeding edge of cybersecurity, publishing a paper on a decades-old idea.
Then again maybe that’s exactly what they’re thinking: “hey we know what we’re doing, and this idea still applies!”
@yaelwrites I've been trying to push Rust at every opportunity. It is the only language that can be a true replacement to C/C++. It is not easy to learn, and that's a Good Thing(tm) because it forces you to develop a far more secure mindset.
The elephant in the room is that the majority of modern languages are enablers of terrifyingly bad quality code. A language should facilitate good code, not force you to develop conventions and code defensively.
@yaelwrites Of course. There are numerous factors you have to consider, the biggest ones being delivery time frame and existing developer skill/knowledge. If your project needs to be out the door next week, you don't have time to ramp up on Rust if you've never used it before.
And that's not even unique to IoT, however since you brought it up, Rust is particularly critical for IoT because you often need to get it right on the first try with no opportunity for later updates.
@yaelwrites Oh! You should have led with that. The devil is 100% in the details on that one. If the solution is ARM or RISC based /w C-based drivers, chances are pretty good. Anything else.. I don't know.
Oh cool! I just checked and there are toolchains to use rust on certain EEPROM microcontrollers! That's so exciting!