what's the rust consensus on early returns
-
-
I do a fair amount of `return expr if condition` in ruby too -- would one-lining `if condition { return expr }` be considered bad style?
-
Personally I thing "the function will return early if this condition is met" is something that deserves to stand out so I'd want the long form if in both languages.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.