Why jam the first two checks into the with statement and create noise?
You don't have to use with for everything just because you like it. I think point 6 is debatable.
You could just say "if not email address or length isn't six return bad_request, else ..."
Fair point. Adding an if else statement increases scope nesting and could add noise too. If that improves the readability / perceived logic flow of your code, then go for it. :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Why jam the first two checks into the with statement and create noise?
You don't have to use with for everything just because you like it. I think point 6 is debatable.
You could just say "if not email address or length isn't six return bad_request, else ..."
Fair point. Adding an
if else
statement increases scope nesting and could add noise too. If that improves the readability / perceived logic flow of your code, then go for it. :)