clojure-dev

Issues: https://clojure.atlassian.net/browse/CLJ | Guide: https://insideclojure.org/2015/05/01/contributing-clojure/
borkdude 2020-01-24T11:05:50.000400Z

why is the interface IRef used here? It seems it only needs IDeref? https://github.com/clojure/clojure/blob/653b8465845a78ef7543e0a250078eea2d56b659/src/jvm/clojure/lang/MultiFn.java#L21

2020-01-24T11:26:38.000900Z

does IRef predate IDeref?

borkdude 2020-01-24T11:29:41.001100Z

seems it does

alexmiller 2020-01-24T13:39:38.002400Z

It seems like no matter how small you make an interface, you later on find a use case that only needs part of it

alexmiller 2020-01-24T13:40:04.003100Z

That is, the ideal number of methods on an interface seems to be 1

➕ 4
p-himik 2020-01-24T13:43:49.003600Z

Or <= 1 (`clojure.lang.{IRecord,IType,MapEquivalence,Sequential,etc}`) :)

alexmiller 2020-01-24T14:00:38.004400Z

I'd still say the ideal is 1 - marker interfaces not being much of an affordance to do stuff, just to annotate stuff

2020-01-24T15:34:59.004700Z

too bad you can’t have negative interfaces - only define what you can’t do

🤯 3
2020-01-24T15:35:10.004900Z

perhaps the ideal number would be -1