2

When you try to use _ as a parameter name in a Java 8 lambda, you get a Use of '_' as a lambda parameter name is not allowed error message.

enter image description here

Two underscores is ok though:

enter image description here

Any reason on why one single underscore is not allowed?

higuaro
  • 15,730
  • 4
  • 36
  • 43
  • 2
    Because we have bigger plans for underscore in the future -- but it takes several versions to complete such a repurposing. Took two full versions (warning in 8, error in 9) to remove it from the space of identifiers. – Brian Goetz Oct 26 '16 at 18:31
  • Are those plans published somewhere? what's the goal actually? – Tibor Blenessy Jan 19 '17 at 10:40

0 Answers0