Re:Using Rust at a Startup: A Cautionary Tale
by bryanlarsen on Tuesday November 22, 2022 @10:48PM
(#33714930)
Rust's safety goes far beyond memory safety. Java or C# or Typescript don't force you to handle errors and don't force you to exhaustively match and don't have an ecosystem that prioritizes safety etc.
[ Parent
| on HN ]
Re:Using Rust at a Startup: A Cautionary Tale
by tptacek on Tuesday November 22, 2022 @10:54PM
(#33714973)
Very little --- I'll go ahead and say, to a first approximation, none --- of that safety has anything to do with software security. The same kinds of bugs that hit Java programs hit Rust programs, with maybe the sole exception of deserialization (which has nothing to do with error handling or type safety).
That matters because that's the kind of "safety" we're talking about when we discuss externalities for end-users --- not servers that need extra monitoring because they might crash.
Re:Using Rust at a Startup: A Cautionary Tale
by bryanlarsen on Wednesday November 23, 2022 @06:39AM
(#33717954)
Ignoring error codes and left-pad style issues are common sources of security issues.
Java is more left-pad resistant than Typescript, granted.
Re:Using Rust at a Startup: A Cautionary Tale
by tptacek on Wednesday November 23, 2022 @10:27AM
(#33720341)
No. Rust doesn't do anything interesting to avoid supply-chain attacks.
Re:Using Rust at a Startup: A Cautionary Tale
by foundajob on Tuesday November 22, 2022 @11:12PM
(#33715078)
> an ecosystem that prioritizes safety etc.
Idiomatic Rust code is just as cavalier regarding NPEs as Java or Python code. Because the language starts to look really gross when you make your code panic-safe. So you have an `expect` here, an `unwrap` there, and now you're going to have the exact same runtime issues as the more expressive managed languages. No Rust programmer thinks their `expect` will panic, just like no Java programmer expects something will be null. Rust does not force you to "exhaustively match".
Re:Using Rust at a Startup: A Cautionary Tale
by bryanlarsen on Wednesday November 23, 2022 @06:35AM
(#33717928)
expect is a lot safer than ignoring a return code.