Put up an <RFC PR> with a proposal for handling th...
# contributing-to-airbyte
c
Put up an RFC PR with a proposal for handling the 
final
 keyword in java. Would like to hear what the rest of the team thinks. Please feel free to respond in the PR. If we are going to move forward with it, I'll shoot to clean up and merge on Monday.
u
I’m not against this, but I want to understand outcomes better.  Final is typically used in a context where variable contents are not expected to be changed, in order to reduce the scope of bugs from accidental data mutations.  Is this the main reason for the cleanup?  Do we have other additional goals? If someone needs to remove ‘final’ from something for their work, is there a set of things they should examine first to make sure they’re not just undoing the progress?  If that’s a predictable set of questions, it’d be great to write them down somewhere in our style guide for reference.
u
you nailed it. my main interest in adding the final key word are: 1. Avoid accidents (as you mentioned) 2. Make the code easier to read. I find myself just adding 
final
 s in as I read code now, because it tells me if this variable can change or not. Right now if there is no final it is either a) that the variable is reassigned or b) someone didn't add it. So I just add 
final
 s as I read code to discover which of the two are the case.
u
One of the techniques I’ve been using during code changes is to eliminate as many local variables as I possibly can without losing readability. With well-structured single-responsibility functions, local variables in Java are often entirely unnecessary. And the code is much shorter and easier to trace with them gone. So that’s also a facet of this - why make stuff final when you can just make it not exist? :D