2 ms·
I think that's a wrong assumption on your side. You are assuming that the type describes the "actual thing". But there is no such actual thing really. All we do
by valenterry 2y ago
I think that's a wrong assumption on your side. You are assuming that the type describes the "actual thing". But there is no such actual thing really. All we do is model. And here we model a view of the user within a certain context. Totally possible that a different department will model their user in a different way.
This isn't even a technical problem, it's a semantical problem. Trying to reuse the same type throughout the whole world is doomed to fail, no matter what techniques you use.
- atoav 2y agoThis is good advice. If you take your models of the world too seriously chances are you are in the process of programming yourself into a corner, as things get more complex. Getting attached to your classes by writing a single superclass of The User™ is a sure way of missing out on the benefits of the typesystem and create coupling where there should be none. Knowing where to couple things and where to decouple things is one of those hard programming issues, but one that might be even more important than naming things.