DigiNews

Tech Watch Articles

← Back to articles

Bending the CLOS Mop for Java-Style Single Dispatch

Quality: 8/10 Relevance: 6/10

Summary

Anthony Green describes bending SBCL’s CLOS MOP to implement Java-style single dispatch for Clojure running on OpenLDK. The approach replaces the multi-dispatch engine with a receiver-class cache and a specialized java-generic-function metaclass, dramatically reducing startup-time overhead caused by thousands of <init> methods. He also introduces a caching layer for invokespecial and a fast path that pre-creates hot generic functions to avoid fallback to default MOP dispatch.

🚀 Service construit par Johan Denoyer