[swift-evolution] [Idea] return if / return unless
Dave Abrahams
dabrahams at apple.com
Thu Aug 4 18:46:46 CDT 2016
on Thu Aug 04 2016, Kurt Werle <swift-evolution at swift.org> wrote:
> Why would you do this just for return statements? Why not do postfix
> conditionals for all statements (like ruby)?
>
> I've always liked postfix conditionals, but not enough to suggest them.
-1 from me. Postfix conditionals are easily mistaken for unconditional
statements when reading quickly. IMO always having the condition first
improves clarity. Furthermore, postfix conditionals don't solve any
real problem in Swift AFAICT.
--
-Dave
More information about the swift-evolution
mailing list