Avoiding primitive obsession in Swift
Alex Curran

If an ID is a string, it’s just a string. Adding another level of abstraction on top of it, introduces more confusion. By saying an ID is actually a separate data type, you are implying that it’s somehow different and complex, while all you want to do is just validate it.

Like what you read? Give Superr Hrvoje a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.