3 ms·
I don’t get what you’re about. The root comment clearly presents a structure of a separate type. The fact that it happens to contain a single string field is co
by wruza 3y ago
I don’t get what you’re about. The root comment clearly presents a structure of a separate type. The fact that it happens to contain a single string field is completely irrelevant (what type an actual username should be, a float?). “Stringly typed” is about stringifying non-string values to save typing work and is not applicable here in the slightest.
- quickthrower2 3y agoI wasn’t sure who was right. I’ll tie break with https://wiki.c2.com/?StringlyTyped= https://wiki.c2.com/?StringlyTyped= which pretty much says what you just said
- antonvs 3y agoThe commenter you're replying to misunderstood the discussion. See my sibling reply.
- antonvs 3y agoI wasn't replying to the root comment, I was replying in the context of the subsequent three comments, specifically: > > > Crazy that actually using your type system leads to better code. > > There's a name for this anti-pattern: "Stringly typed" > I don't think a reasonable person would consider storing a username in a string to be "stringly typed". #1 was saying that the root comment shows better code using the type system. #2 was clearly referring to the case where you don't do this as being an anti-pattern. #3 is saying that storing a username in a string, without wrapping defining a distinct type for it, was not stringly typed. But as I pointed out, it certainly is. If you doubt my interpretation of #3, the same commenter said this in another comment: "Is it really more 'programmer friendly' to create wrapper types for individual strings all over your codebase?"
- wruza 3y agoI see, my apologies!