4 ms·
That's actually a feature of encapsulation. The object (ideally) is used to abstract away those details so I don't need to know about them, only how to create t
by duped 4y ago
That's actually a feature of encapsulation. The object (ideally) is used to abstract away those details so I don't need to know about them, only how to create the object. Encapsulation is a different feature than reuse.
The exception is in languages that use that syntax as a way to implement keyword arguments, but I would still ask people to destructure it in the parameter list or at the top of the function so I can see what the arguments are.
The point is that when I am looking at a function definition I need to know how to call it. As described all I see is obfuscation to save some keystrokes, not clean code.
- robertlagrant 4y agoBut how would you know how to call it if it takes an object as an argument? How different would the process be for looking at a named standard set of arguments?