Earlier quoted context omitted.
> My point is that the API consumer does not guarantee types (say it's REST or something), so the assumption that the string you send it will always be the right type (or call it "format") seems like a bad one. The raw data from the API will not have any of your internal types applied to it yet, it'll be raw bytes or typed `string`. So I don't really see the connection between this and "I will still always be able to…
> And once your own trusted code has made an OrgId, you don't need any runtime checking to see if it actually is an OrgId. Right, and once I have a verified OrgId, I'll just keep using the `myOrgId` variable throughout my code, and I don't really need branding. Maybe I can do type aliasing to make the code easier to read (type OrgId = string), but hardline type verification via branding seems moot unless you can make…
I would rather put that information in the type system than in the variable name.
It prevents passing the wrong variable, is that not useful?
> Exactly.
I don't see how what I said agrees with what you said. Making it not an OrgId prevents the weird blowups.
A compilation error because you used the wrong type is not a blowup, it's preventing random blowups.
And you shouldn't be shuffling digits using string code, that's the point. If you have a way to transmute OrgIds, it should be a function that returns an OrgId.
I'd question whether people even need to know OrgId is a string.