Blunt or not, I understand where you are coming from.
First you are not just renaming a variable when you add the _
, you are telling the compiler to ignore that argument, you could replace the whole name with just _
, although _state
is more clear towards the future.
What I do not agree with is that this warning would not appear when using a strongly typed language. If the LSP integration is working in your editor you would get the warning there when you are writing the function and not only at compile time.
Option 1 is the clear winner and default, if later on you need that variable you can easily find and “reactivate” it, the compiler will error out on you if you don’t.
Option 2 & 3 are worse as they trick the compiler and you never want to do that.
My opinion, as always it is your codebase and yours to maintain.