bitloops-language icon indicating copy to clipboard operation
bitloops-language copied to clipboard

Reverse then and else body in domain if checks

Open Varagos opened this issue 2 years ago • 1 comments

Subject of the issue

Change if checks inside useCase's execute method body.

Expected behaviour

image

Actual behaviour

image

Suggested solutions?

Expression should be reversed, and then-else bodies swapped probably If then statement returns, we don't need to wrap the remaining code in an else statement, to avoid redundant nested if statements.

Varagos avatar Nov 01 '22 11:11 Varagos

Its seems here there are two different issues... initially the problem with title, and a secondary improvement for the if statements. It seems there was a reason at the moment it was developed that way-to be able to have multiple return OKs. At the moment it seems there is no need for it, so we can discuss it as an improvement.

sardounis avatar Nov 01 '22 11:11 sardounis