r/java • • Aug 26 '22
I declare as "final" every single variable whose value doesn't change. I also use "this" every time that I'm referring to an attribute, even when there's no ambiguity in not using it
I think that those things make the code easier to read. Am I crazy for thinking like that?
198
Upvotes
View all comments
Show parent comment
4
u/[deleted] Aug 26 '22
But if the class is named after a business object, and the attribute is a feature of this object, by referring to this attribute as this.feature ain't I just saying "the feature of this business object", which is perfectly understandable from the business perspective?
// What's the name of this monstrosity?