How do you name unused variables? If even just having to make that choice annoys you (it's not just me, right?), read on for how #JavaNext will fix that and make pattern matching (how's that related?!) more maintainable in the process. 🧵
TL;DR: Unused variables suck. They're rare now, but will be more prevalent soon. JEP 443 proposes to replace them with _ for cleaner code and better pattern matching. "This 🧵 should've been 📰" ⇝ nipafx.dev/inside-java-ne… "This 🧵 should've been 📽️" ⇝ youtube.com/watch?v=nP1k41…
Whether it's lambda parameters, catch clauses, try-with-resources, or other places: Sometimes we need to declare variables that we don't use and that sucks: * what to name them? * visual clutter / distraction * compiler / linter warnings