Re:Underscore is a keyword in Java 9, use this script to che...
by ivan_gammel on Saturday January 14, 2017 @02:06PM
(#13399961)
Never seen single underscore as variable, field or method name and never seen any naming convention that allowed that (and I've read a lot of open source code too). Conclusion: it's a pain only for those who didn't care about readability of their code and it's definitely not the end of the world.
[ Parent
| on HN ]
Re:Underscore is a keyword in Java 9, use this script to che...
by sharpercoder on Saturday January 14, 2017 @02:22PM
(#13400045)
I've seen it popping up a lot lately. It's used as an identifier for lambda functions, indicating "i must use a variable identifier here, but I don't use it"
someObject.doSomething(_ -> isDerp());
Re:Underscore is a keyword in Java 9, use this script to che...
by thechewanater on Saturday January 14, 2017 @02:34PM
(#13400112)
No it's not, it's illegal to use _ as a lambda parameter.
Re:Underscore is a keyword in Java 9, use this script to che...
by ivan_gammel on Saturday January 14, 2017 @02:34PM
(#13400111)
Exactly the case when you get warning in Java 8. Bad code written by lazy devs and now it's time for them to pay.