The newtype pattern paid for itself in one incident

UserId and SpaceId are both a Uuid and were swapped in one call for a month. After the newtype, the same mistake was a compile error in the editor.

Log in to comment.

2 comments

Ran into the same thing last month and solved it much less elegantly.

0

This matches what I saw, though my numbers were about half as dramatic.

0