How do multimethods solve the namespace issue?

Dynamic dispatch and namespace resolution are two different things. In many object systems classes are also used for namespaces. Also note that often both the class and the namespace are tied to a file. So these object systems conflate at least three things: class definitions with their slots and methods the namespace for identifiers the … Read more

Clojure multimethods vs. protocols

Protocol and multimethods are complementary and intended for slightly different use cases. Protocols provide efficient polymorphic dispatch based on the type of the first argument. Because the is able to exploit some very efficient JVM features, protocols give you the best performance. Multimethods enable very flexible polymorphism which can dispatch based on any function of … Read more

What is “polymorphism a la carte” and how can I benefit from it?

You can take Polymorphism a la carte as Polymorphism on demand. Clojure community are proud of the term Polymorphism a la carte because of the fact that Clojure support multiple polymorphism strategies. Some of them are: Prototype-based polymorphism Inheritance polymorphism This is the polymorphism strategy used by Java. Clojure support this by proxy. Useful when … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)