I enjoyed Priyatam Mudivarti’s presentation at Clojure Remote:
I haven’t gotten to the lessons on Protocols yet, but do they cover the combination he recommended of protocols + records + schemas?
On a related note, I’d like some guidance on when using all this is a good idea … and when not.
From Stuart Sierra’s review of Clojure Applied:
Embracing the possibilities of design in a dynamically-typed language requires a willingness to work with values whose types may be unknown at certain points. For example, the type of the “accumulator” value in a transducer is hard to define, because for most transducers its type is irrelevant. The ability to ignore types when they are not needed is what makes dynamic languages so expressive.
On the other hand, I have seen many large Clojure programs drift into incomprehensibility by failing to constrain their types in any way, passing complex nested structures everywhere. In this case, the lack of validation leads to a kind of inside-out spaghetti code in which it’s impossible to deduce the type of something by reading the code which uses it. Given the choice between these two extremes, “over-typed” code will be easier to untangle than “under-typed,” so perhaps introducing validation early is a good idea.
Please vote. Comments are encouraged!
Yes, please teach this!
No, I’m not interested.