Hacker News new | ask | show | jobs
by agbell 1866 days ago
Yeah, refined types are a great solution to this problem, but can lead to slow compile times. Just having private constructor for a case class and a public apply method that is an Option or Either or something can go a long way in my experience.