re: Unhealthy Code: Primitive Overuse VIEW POST

FULL DISCUSSION
 

There are a couple of good examples here! One thing that I don’t like about the enum is that it mixes two concerns:

  1. Authentication Result (Success, Failure), there are really only those two
  2. User State, might even allow more than one (FirstLogin, LockedOut) etc

I would probably use a type like a tuple that returns something like
{Success, [FirstTime]}
{Failure, [LockedOut]}
Just a quick scratch, but you might the idea.

code of conduct - report abuse