News for hackers. Stuff that matters.
Re:Comparing JavaScript, CoffeeScript & ClojureScript by duelin_markers on Friday January 27, 2012 @05:02AM (#3517770)
An important difference between Clojure protocols and C# extension methods is that protocols are one of the tools for polymorphism in Clojure, the (only?) other being multi-methods, whereas extension methods are just syntactic sugar for static methods and therefore aren't polymorphic.
Re:Comparing JavaScript, CoffeeScript & ClojureScript by Mikera on Wednesday February 01, 2012 @08:53PM (#3541075)
Clojure also supports prototype-based polymorphism via Associative objects, inheritance polymorphism via Java interop/proxy, interface-based polymorphism with deftype/defrecord, polymorphism via abstraction (see the Clojure sequence operations for example, which use Java interfaces under the hood but you'd never know....). And probably a few more I can't remember right now..... there's a reason Rich Hickey calls it "polymorphism a la carte".