Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
softc
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
softc
10y ago
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 fact that you ha
2.
▲
by
softc
10y ago
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 loops. I
3.
▲
by
softc
10y ago
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 cas
4.
▲
by
softc
10y ago
With this method, do you have to implement the From trait for every pair of errors that can be propagated up the stack?
5.
▲
by
softc
10y ago
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. Also I don't think
6.
▲
by
softc
10y ago
No they aren't, you must issue a compare instruction to verify the result was successful.
7.
▲
by
softc
10y ago
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 errors are comm
8.
▲
by
softc
10y ago
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 from C++, not the othe
9.
▲
by
softc
10y ago
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&#
10.
▲
by
softc
10y ago
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.
11.
▲
by
softc
10y ago
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 all code can enco
12.
▲
by
softc
10y ago
Yes I would. In modern C++ we use exceptions and RAII for automatic cleanup.
13.
▲
by
softc
10y ago
https://en.wikipedia.org/wiki/Mass%E2%80%93energy_equivalenc...
14.
▲
by
softc
10y ago
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 error typ
15.
▲
by
softc
10y ago
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 you studied abs
16.
▲
by
softc
10y ago
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 differentia
17.
▲
by
softc
10y ago
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 energy abso