This post discusses the use of Map-Oriented Programming (MOP) in Java and the drawbacks of using Map as a generic Pair type. It explores the options of using specific types like Bag and Multimap instead of Map, and suggests the use of Java Records for more specific and statically-typed collections. The post also highlights the benefits and drawbacks of Map-Oriented Programming and recommends using Map as a return type only when necessary.
Table of contents
Map-Oriented Programming in JavaTo the Batpoles!We don’t need a Pair type!Stop Hammer time!Whither Map-Oriented ProgrammingSort: