why can't you use `_` as a parameter name in norma...
# announcements
t
why can't you use
_
as a parameter name in normal functions?
c
because it is reserved for unused parameter names, that feature seems to be useless for regular functions, isn't it? what is a usecase?
g
Also
_
is reserved keyword in Java 9
k
@cy when you override a function, you can't remove a parameter even if it's unused
c
why do you need to remove it?
parameter shouldn't be marked as unused if the function is overridden
k
maybe you want to explicitly mark the paramerer as ignored. not a frequent usecase for me, just speculating
c
it is not so useful for self-documenting code because it is generally a super-type at call-site (otherwise the questions is why do you have type hierarchy at all)
o
I agree with Kirill. Bar somewhat different circumstances, the use case is almost identical to that of ignored parameters in lambdas
t
sometimes I'm overriding the function and don't really need all parameters
c
well, you generally don't need to type all the parameters as Ctrl-O does it for you 😉
k
pft, typing is so 2006 😄
my argument was about reading
c
Omitting parameters also has a disadvantage: when you read it you can't see what was omitted and why