from the json-rust parser.rs:
// There is a lot of macros here! Like, woah! This is mostly due to the fact // that Rust isn't very cool about optimizing inlined functions that return // a `Result` type. Since different functions will have different `Result` // signatures, the `try!` macro will always have to repackage our results. // With macros those issues don't exist, the macro will return an unpackaged // result - whatever it is - and if we ever stumble upon the error, we can // return an `Err` without worrying about the exact signature of `Result`. // // This makes for some ugly code, but it is faster. Hopefully in the future // with MIR support the compiler will get smarter about this. how true is this still?
3 posts - 3 participants

