> Ability to temporarily borrow exclusively owned objects as either shared or exclusive-mutable adds enough flexibility. Rust quietly has several other features in order to improve the quality-of-life of its ownership…
> I do wish not handling a Result was a hard error, and not just a warning via `must_use` It is possible to turn any Rust warning into an error with the use of the `deny` attribute. In addition it is now possible to…
I have been aware of this proposed initiative for some time and I find it interesting that it is now becoming public. It is a very ambitious proposal and I agree that this level of ambition is appropriate for DARPA's…
> Most serious programs will use write() and then check the return value. Similarly in Rust, serious programs will use writeln rather than println, and will receive the standard compiler warning if the Result produced…
Let us be clear that the notion of "change" being referred to here is forward compatibility, not backward compatibility. The user is commenting on the fact that Rust library authors make use of new features as they…
This was my initial mindset as someone whose background lies in untyped languages, but after time with Rust I no longer feel that way. My feeling now is that seeing a Rust codebase typecheck gives me more confidence…
The +=1 in the above code is defined behavior. Unlike in C, the Rust compiler is not allowed to assume that overflow does not happen, and must restrict its optimizations accordingly. The undefined behavior in this code…
Rust's linting tool, Clippy, provides a lint that will produce a warning when a function pointer is cast to any integral type: https://rust-lang.github.io/rust-clippy/master/index.html#/f... The broader topic of whether…
No, Rust does not allow safe conversions from integers to function pointers. The code `main as usize as fn()` will result in a "non-primitive cast" error. In order to convert from an integer or raw pointer to a function…
> Question: are there any opportunities to rewrite this logic in a more "structured" style, or to make any other optimizations? Because A and C only jump to B it is possible to structure this using only loops and one…
> Ability to temporarily borrow exclusively owned objects as either shared or exclusive-mutable adds enough flexibility. Rust quietly has several other features in order to improve the quality-of-life of its ownership…
> I do wish not handling a Result was a hard error, and not just a warning via `must_use` It is possible to turn any Rust warning into an error with the use of the `deny` attribute. In addition it is now possible to…
I have been aware of this proposed initiative for some time and I find it interesting that it is now becoming public. It is a very ambitious proposal and I agree that this level of ambition is appropriate for DARPA's…
> Most serious programs will use write() and then check the return value. Similarly in Rust, serious programs will use writeln rather than println, and will receive the standard compiler warning if the Result produced…
Let us be clear that the notion of "change" being referred to here is forward compatibility, not backward compatibility. The user is commenting on the fact that Rust library authors make use of new features as they…
This was my initial mindset as someone whose background lies in untyped languages, but after time with Rust I no longer feel that way. My feeling now is that seeing a Rust codebase typecheck gives me more confidence…
The +=1 in the above code is defined behavior. Unlike in C, the Rust compiler is not allowed to assume that overflow does not happen, and must restrict its optimizations accordingly. The undefined behavior in this code…
Rust's linting tool, Clippy, provides a lint that will produce a warning when a function pointer is cast to any integral type: https://rust-lang.github.io/rust-clippy/master/index.html#/f... The broader topic of whether…
No, Rust does not allow safe conversions from integers to function pointers. The code `main as usize as fn()` will result in a "non-primitive cast" error. In order to convert from an integer or raw pointer to a function…
> Question: are there any opportunities to rewrite this logic in a more "structured" style, or to make any other optimizations? Because A and C only jump to B it is possible to structure this using only loops and one…