I had some students recently inquire about records in Clojure, which got me thinking. From my perspective they are mainly holdovers from primitive Clojure (meaning both “the early days” and also “under the hood”). I’ve reckoned them as hold-overs from Java and holding appeal for Java veterans, which I’m not. In modern code I’ve heard of just two justifications:
- Some efficiency/optimization matters over raw maps
- Useful for sharing a prescribed map structure when your codebase will be used by many.
Is there more to it than this? If you’ve made good use of records, why?