[lambda-leftovers] Underscore parameter for abstract/native methods

Tagir Valeev amaembo at gmail.com
Sun Jun 25 10:51:35 UTC 2017


Hello!

Currently in lambda-leftovers underscore is allowed as a parameter name for
abstract methods. This looks dubious as normally underscore means that
parameter is not used in the corresponding method/lambda/catch body, but
there's no actual body and no parameter is actually used anyways (but could
be used in abstract method implementations). I think, allowing underscores
for interface methods may encorage bad practices of defining interfaces
without readable parameter names:

interface X {
  void doSomething(int _, long _, String _);
}

Should not this be disabled?

It's even worse for native methods, because underscore assumes that
parameter is not used, but it does not limit the corresponding native
implementation from using it.

With best regards,
Tagir Valeev.


More information about the amber-dev mailing list