|
|
|
|
|
by groovy2shoes
4331 days ago
|
|
> For example, Clojure does not have dynamic dispatch (except for multimethods, which are a limited form of dynamic dispatch) other than that offered by OO polymorphism (interfaces/protocols). In other words, it lacks the most important mechanism that lends dynamically typed languages like JavaScript and Ruby their power. Multimethods are actually a rather powerful form of dynamic dispatch. From the context, I think what you're referring to is late binding, which is when an identifier is resolved to a storage location / function implementation at runtime rather than at compile time. It's easy to get them confused, since late binding gives you dynamic dispatch "for free", but it is possible to have dynamic dispatch with early binding (as in C++, for example). > Calling Clojure "dynamically typed" in this context (or any context), is confusing, as it is more of a mashup of a few ideas from functional and OO languages than a typical dynamically typed language. A language's type system (or lack thereof) has nothing at all to do with dynamicity of dispatch nor binding. |
|