3 ms·
That is quite different. ? in Rust signifies "this code is not important" Which even in systems is unavoidable, to be fair. Sometimes failure just isn't import
by randomdata 3y ago
That is quite different. ? in Rust signifies "this code is not important"
Which even in systems is unavoidable, to be fair. Sometimes failure just isn't important. The division between systems and scripts is not perfect. But, that will be the uncommon case in systems. It is not certain that really needs a symbol in which to draw attention. (An implementation may need a symbol, but that's beyond this discussion)
- gaganyaan 3y agoI'm not sure why you think it's unimportant. You seem to be confusing its purpose, and making distinction between systems and scripts that doesn't apply here. Rust's whole error handling, including the ? operator work great for embedded systems where Go isn't enough of a systems language to even run. EDIT: I think you're confused. The ? operator says "I'm not handling this specially here". That doesn't mean the error is just propagated to the top like an uncaught exception in a Python script. It allows you any level of granular handling you'd like.