-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 20.09.2011 05:43, schrieb Sean Corfield: > On Mon, Sep 19, 2011 at 4:19 PM, Dennis Haupt > <d.haup...@googlemail.com> wrote: >> an advantage i see is very, very concise code since you have no >> type annotations at all. the downside is that exactly this code >> might be unreadable - because you just have no idea what it uses >> and what it does without tests or documentation. > > I find Clojure code more readable because it is generic. Instead > of some algorithm specialized by type, Clojure often deals with > simpler generic algorithms that are applicable to a broader class > of data structures which can also mean more reuse. > > Writing truly generic code in the presence of a strong type system > is often harder word and tends to produce much more dense, more > annotated code that I find harder to understand. Take a look at > the documentation for the Scala collection library, for example > (I'm not dissing Scala - I like Scala, but I don't think anyone > will disagree that the auto-generated documentation based on the > library type signatures is very hard to read, at least for the > "average developer").
i tend to completely ignore all non-trivial type signatures and treat them as "what constraints are in a database". rules that prevent me from doing things that are obviously wrong. for scala's collection framework, that is enough. i can use it perfectly well, i know exactly what it does - i just don't know *how* in detail they work. but the trivial stuff like "this parameter must support method x" or "always returns an instance of type x" really helps. - -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJOePUTAAoJENRtux+h35aGGHAP/j0gCcyJIBntewvQCTgaS1Xz lOj4WnrJAfMWKK/Z2r0IBgKBCI8lwqRCYvzqDMa0tVi/Lnfk8tMVMjU2x0KSX1sZ BRSoWaueQzHmnbqtCr83vfeIhz9XngmeY8b8vJ+8WjYylK2OyUlfq6I2LhR/fy1M Un8SIiMT3RtUypDdWgHBALMNXnWbw+ToHHLOKX+XpXv4FjP8G8q6g/H2vouIAt0i tCEPom2aVpGguf2f3V49jcIzU03hwKM2qfnyF4B4rejuS17kGbpBSlaavdSfQus0 sv/s14EpoIOKcIp5SQqRRE96GfmHlopshNuoB4oS3qt57oeSudI20pl/8K/zdI6y 7CajeZUA/Sl56syjTjbdq0bwOcUwWrXJVDJefJ4tgSYJu2hQnTST6NS0Op1+Mm71 nTFG4+SgEMzXoT20NGoE16wKtJn//XLkKHzQ0h/1FvSJ6pTRL/+o8hj/lDA5Y/FD qLBGaJl6z8jXB8Nltv4nTCS24ZUAn8eDOhv184OvtkTxXXu7MZnu/XPoVueRrbzP /AWLjqPwko3MdEp8/ApqtKSdZ23rW4cm5Yxo/zytCoGoDSDu7/8m5XiWKUU2Oa2R MY8EUPcRz+qawE4CaFIevzLb/EfMgJnbtvBZ9LD6VQApFweIMO1/Rc6J1rRavwps MJWJC58v8gH0AKzs0lv5 =Rlqq -----END PGP SIGNATURE----- -- 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