3 ms·
I cannot recall ever passing an invalid UUID (or long id) into a function due to statically-knowable circumstances.
by recursivedoubts 1y ago
I cannot recall ever passing an invalid UUID (or long id) into a function due to statically-knowable circumstances.
- happytoexplain 1y agoThe point is that you might pass a semantically invalid user ID. Not that you might pass an invalid UUID. I generally agree that it's easy to over-do, but can be great if you have a terse, dense, clear language/framework/docs, so you can instantly learn about UserID.
- ThunderSizzle 1y agoMore specifically, if all entities have a GUID, it's not impossible to accidentally map entity A ID to entity B ID accidentally, especially when working with relationships. Moving the issue to the compiler is nicer than the query returning 0 results and the developer staring endlessly for the subtle issue.