<div dir="auto"><div>Hello!<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">чт, 8 сент. 2022 г., 00:14 Brian Goetz <<a href="mailto:brian.goetz@oracle.com">brian.goetz@oracle.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
><br>
> As a teacher, i vote for A, APIs should be documented, giving a good <br>
> name to a parameter is usually the first step.<br>
><br>
<br>
I'm willing to consider starting with A, though I think we should admit <br>
that the most likely reaction if we do that is "you idiots got it wrong <br>
again, we waited 25 years for underscore, and you don't even let us do <br>
it in the most obvious places." So I don't think "do A and never do <br>
anything about method parameters" is going to fly, though it is <br>
potentially a reasonable incremental step on the way there to get people <br>
used to unnamed things.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I'm not sure it's so critical. To me, the main source of frustration is the necessity to think up a name that I won't use anyway. The second source is the fact that the code becomes noticeably longer when it includes unused names. Both problems are not so important for method parameters:</div><div dir="auto"><br></div><div dir="auto">- If you override or implement method, any IDE just copies names from the super-method for you, so you don't need to think.</div><div dir="auto">- Method declaration is already quite verbose. It contains @Override annotation, modifiers, types of all parameters and return type explicitly spelled, all of them could be quite long. Probably other annotations, throws and Javadoc. Saving few chars there would not help much. On the other hand, declaration doesn't contain logic, so people rarely stare at it trying to understand what's going on.</div><div dir="auto"><br></div><div dir="auto">Another problem, namely polluting namespace with an unused name, stays, but I believe it's not so important. It may be confusing if you want to reuse the name of super-method parameter for another purpose, so occupying it by default has its advantages.</div><div dir="auto"><br></div><div dir="auto">That's said, I'm also for A. It's simple and well defined. It's in line with lvti philosophy and will be already very helpful without adding confusion and strange corner cases.</div><div dir="auto"><br></div><div dir="auto">With best regards,</div><div dir="auto">Tagir Valeev.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>