2 ms·
> I would much rather have = mean assignment, and use function call notation when I really want functions to run. And then you end up with Java where you have
by netheril96 7y ago
> I would much rather have = mean assignment, and use function call notation when I really want functions to run.
And then you end up with Java where you have to write so many boilerplates for getters and setters, even if they are only plain attribute access, just in case you want a function later.
- geophile 7y agoI agree that a very common Java pattern is to create getters/setters for every private field. Which is just stupid, might as well have the members be public. To use the popular phrase, Java classes like that have a "bad code smell". It tells me that the author of the class doesn't really understand how it should be used. I think a well-designed class will have private members and public member function interfaces that don't resemble each other very much.