Top
Best
New

Posted by emschwartz 6 days ago

Error handling in Rust(felix-knorr.net)
159 points | 150 commentspage 3
cute_boi 6 days ago|
Rust should seriously stop using macros for everything.
nixpulvis 6 days ago||
What's wrong with macros?

Especially attribute style macros which apply to variants of an enum allow a lot of code expansion which reduces boilerplate a lot.

pjmlp 5 days ago||
Increase of compile times, on a already blazing fast compiler.

Debugging, especially when it lacks the tooling of a Lisp or Scheme REPL/IDE.

kaashif 6 days ago||
I agree with this. It appears that in this case, macros are a band-aid over missing features in the type system.

I feel like structural typing or anonymous sum types would solve this problem without macros.

I mean given A = X | Y and B = X | Y | Z, surely the compiler can tell that every A is a B?

estebank 6 days ago||
This has problems as soon as it hits generics and lifetimes.

That being said, I think a limited version of the feature that disallows the the same type with divergent lifetimes or even all generics would still be useful and well liked.

burnt-resistor 6 days ago||
To skip recreating OOP in Rust, use anyhow instead.
unit149 6 days ago||
[dead]
stephenlf 6 days ago|
I apologize for this sidebar. I don’t have much to contribute to the technical content. It was an interesting read.

You use, too many, commas, in your, writing. It’s okay to have a long sentence with multiple phrases.

Thanks for sharing your thoughts.