This is standard but it requires more scrutiny. Contracts are intended to be a two-way agreement, not a way to manipulate you into giving up your IP rights for the sake of employment. I'd say push back and bring up the…
The Itanium ABI is basically the reference ABI for all platforms, it doesn't only apply to Itanium. Rust's error checking overhead is not unanimously irrelevant, it's not uncommon for functions to be called in tight…
Good point. Some responses: Function calls themselves can force something like "x = 1" if x is observable from the callee. In the case where "x = 1" is not observable from the catch block, then there is no effect. In…
With this method, do you have to implement the From trait for every pair of errors that can be propagated up the stack?
Hmm no. Rust always issues a compare instruction after a function call to verify if it was successful or not. In a function that can fail depending on runtime conditions, the compiler is unable to elide such a check.…
No they aren't, you must issue a compare instruction to verify the result was successful.
Not every platform has a branch predictor, like low-cost embedded platforms, where bare metal languages like C++ are commonly used. Error-case performance is negligible as it's much more rare (cf. Amdahl's law). If…
Exception handling in C++ is absolutely zero-cost when no exception occurs. Look up the Itanium ABI. In Rust, even if no error occurs, the return value must still be checked. Additionally, Move semantics were borrowed…
I understand exactly what "?" does, I just don't want to have to type it every time I call a function that can fail. Additionally I don't want to have to distinguish between which functions fail and which don't, I'd…
In C++ with the Itanium ABI, exceptions only add overhead when thrown, not on every function call. In Rust, the result of every function call is checked.
Just to clarify, In this specific case, I think we're talking about interface, not implementation. Your preference is fair, since interface is a subjective issue. Personally, I find it more convenient to simply assume…
Yes I would. In modern C++ we use exceptions and RAII for automatic cleanup.
https://en.wikipedia.org/wiki/Mass%E2%80%93energy_equivalenc...
A language's error-handling story is a central part of the experience of using that language. Especially if that language is a systems language. Rust's error handling still seems unnecessarily verbose to me. A specific…
I think the similarity to de Morgan's law falls out naturally as a consequence of Boolean algebra having many similar properties to real number algebra, both for the multiplication operation and addition operation. Have…
d^2/dx^2 sin(x) = -sin(x) This means that sin(x) is an eigenfunction of the second derivative operator in the infinite dimensional vector space of functions. This little fact makes numerically solving second-order…
Just to clarify, mass-energy equivalence implies nothing about mass-energy conversion. We've never witnessed such a conversion nor do we know if it's possible. The implication is that mass difference of an atom after…
This is standard but it requires more scrutiny. Contracts are intended to be a two-way agreement, not a way to manipulate you into giving up your IP rights for the sake of employment. I'd say push back and bring up the…
The Itanium ABI is basically the reference ABI for all platforms, it doesn't only apply to Itanium. Rust's error checking overhead is not unanimously irrelevant, it's not uncommon for functions to be called in tight…
Good point. Some responses: Function calls themselves can force something like "x = 1" if x is observable from the callee. In the case where "x = 1" is not observable from the catch block, then there is no effect. In…
With this method, do you have to implement the From trait for every pair of errors that can be propagated up the stack?
Hmm no. Rust always issues a compare instruction after a function call to verify if it was successful or not. In a function that can fail depending on runtime conditions, the compiler is unable to elide such a check.…
No they aren't, you must issue a compare instruction to verify the result was successful.
Not every platform has a branch predictor, like low-cost embedded platforms, where bare metal languages like C++ are commonly used. Error-case performance is negligible as it's much more rare (cf. Amdahl's law). If…
Exception handling in C++ is absolutely zero-cost when no exception occurs. Look up the Itanium ABI. In Rust, even if no error occurs, the return value must still be checked. Additionally, Move semantics were borrowed…
I understand exactly what "?" does, I just don't want to have to type it every time I call a function that can fail. Additionally I don't want to have to distinguish between which functions fail and which don't, I'd…
In C++ with the Itanium ABI, exceptions only add overhead when thrown, not on every function call. In Rust, the result of every function call is checked.
Just to clarify, In this specific case, I think we're talking about interface, not implementation. Your preference is fair, since interface is a subjective issue. Personally, I find it more convenient to simply assume…
Yes I would. In modern C++ we use exceptions and RAII for automatic cleanup.
https://en.wikipedia.org/wiki/Mass%E2%80%93energy_equivalenc...
A language's error-handling story is a central part of the experience of using that language. Especially if that language is a systems language. Rust's error handling still seems unnecessarily verbose to me. A specific…
I think the similarity to de Morgan's law falls out naturally as a consequence of Boolean algebra having many similar properties to real number algebra, both for the multiplication operation and addition operation. Have…
d^2/dx^2 sin(x) = -sin(x) This means that sin(x) is an eigenfunction of the second derivative operator in the infinite dimensional vector space of functions. This little fact makes numerically solving second-order…
Just to clarify, mass-energy equivalence implies nothing about mass-energy conversion. We've never witnessed such a conversion nor do we know if it's possible. The implication is that mass difference of an atom after…