Conversation with @BrianGoetz about pattern matching in #JavaNext: * why `Map::get` should be a pattern * the linear thinking trap * null handling in pattern matches * exhaustiveness in switch statements * the rehabilitation of `switch` youtube.com/watch?v=a8OdwU…
@BrianGoetz On the rehabilitation of `switch`, Brian said (at 16:58m, youtube.com/watch?v=a8OdwU…): > The choice wasn't really "make a new thing", it was "have two things". A fact that's often overlooked when starting something new. Unless there's an actionable plan to remove the old thing…
@BrianGoetz … it will stick around and then you have (near) twice the complexity, twice the amount of code to debug, twice… you get the point. So when starting something new, consider carefully whether and how the old can be phased out.