This stuff doesn’t get written because people are stupid. It solves real problems people have, and it’s the easiest way to solve them in a language that’s fundamentally inadequate. When people think HKT or monads or what-have-you aren’t necessary in a language, I point them at Spring for the examples of what happens when a language doesn’t have them.
For the lack of a nail,
throw new HorseshoeNailNotFoundException("no nails!");
For the lack of a horseshoe,
EquestrianDoctor.getLocalInstance().getHorseDispatcher().shoot();
For the lack of a horse,
RidersGuild.getRiderNotificationSubscriberList().getBroadcaster().run(
new BroadcastMessage(StableFactory.getNullHorseInstance()));
This stuff doesn’t get written because people are stupid. It solves real problems people have, and it’s the easiest way to solve them in a language that’s fundamentally inadequate. When people think HKT or monads or what-have-you aren’t necessary in a language, I point them at Spring for the examples of what happens when a language doesn’t have them.
etc.
I particularly like QualifierAnnotationAutowireCandidateResolver and SimpleBeanFactoryAwareAspectInstanceFactory as well
Mamas (and papas) don’t let your babies grow up to be Java developers….