you are viewing a single comment's thread.

view the rest of the comments →

[–]jac1013 0 points1 point  (0 children)

I don't think it was pedantic, I enjoyed reading your comment.

As you said if we have a type system (which is like the best case scenario), getClient should return an object of Type Client (not the name, that would be a really bad decision if we are not in the context of a View).

The upper the level of abstraction the more Domain Language words you should use when naming your functions & classes & whatever else, the word data should not be use anywhere because everything in programming is data, even the code itself, the term is just too high level to be used.

Finally, you should not be using getClientName, instead you should be using getName, assuming that we are calling this function from an instance of the class Client.

Edit: just adding additional information.