On Tuesday, 10 July 2018 05:38:33 MDT kdevel via Digitalmars-d-learn wrote: > I would like to suggest an extension of the language by > introducing > > static return Expression_opt; > > which shall have the effect of a return plus that the remaining > lines in the current block are treated as if they were enclosed > in an else block.
Well, you can propose it, but it really doesn't fit with how static if works. static if doesn't have anything to do with control flow, whereas what you're proposing here would, which would arguably make it that much more confusing. I confess that I don't understand what the problem is with simply adding an else block. It's simple, and it works right now without any language changes. - Jonathan M Davis