clojure-dev

2026-01-26T18:30:55.009549Z

Would an Ask for improving definterface to allow it to extend other interfaces be welcome? I’ve had to drop to java just for this. Use case is working with primitives (where protocols don’t help), to get things to dispatch nicely in a zero boxing primitive transducer implementation.

Alex Miller (Clojure team) 2026-01-26T18:35:14.549139Z

gen-interface can extend, does that help at all

Alex Miller (Clojure team) 2026-01-26T18:38:23.100399Z

definterface wraps gen-interface and also imports, but you could do that. I'm not really sure why they differ here

2026-01-26T18:38:24.302279Z

Thanks, I’d forgotten about gen-interface. There’s not much difference in overhead though, between having to use AOT and using java compilation.

2026-01-26T18:39:37.300139Z

I’ll look at the definterface implementation.

Alex Miller (Clojure team) 2026-01-26T18:42:29.507829Z

but an ask would be ok too, I can't think of a good reason for definterface not to allow extends

❤️ 1