On Thu, Feb 28, 2013 at 1:16 PM, Jim - FooBar(); <jimpil1...@gmail.com>wrote:
> not that I have any serious arguments agaisnt what you're saying but > this sounds very limiting...where is the power then? what are the chances > that you will be able to extend a particular protocol to many types without > needing at least 2-3 arities...it's perfectly fine that an exception will > be thrown if someone calls the wrong arity isn't it? > It's worth examining how protocols were done in ClojureScript. In every case where a protocol fn has multiple arities they are all implemented. The one outlier is IFn, and I don't personally have a good answer for that. in addition, how about when extending a protocol to an interface that > defines multiple arities? The concrete classes implementing that interface > and thus your protocol, need to be able to be called with whichever arity > is available. some other interface though may only defines a single arity > but you still want to extend the protocol to - what do you do then? > Being able to extend protocols to interfaces is a nice JVM-centric convenience. It's not clear to me the whether the peculiarities around interface interop have much to do with the actual semantics of protocols. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.