definterface

2 views
Skip to first unread message

William la Forge

unread,
Sep 8, 2015, 11:09:23 PM9/8/15
to AgileWikiDevelopers
Great discussion today: https://groups.google.com/forum/#!topic/clojure/j4vSv-Pr6Co


Using definterface instead of defprotocol in some cases really cleans up a lot of issues for me, just as using defrecord instead of deftype is other cases.

My hope is that now I can stop fighting the language and start writing better Clojure code.

Now as long as you are avoiding features that use reflection, I don't see Clojure as adding anything in helping make code more reusable. But I still have a feeling that the AA Tree code written in Clojure will be much more reusable. Contributing factors are the power of the language and the fact that I'm doing a rewrite. Being more powerful means rewrites take less time, of course. As well as contributing to the clarity of the code--which is always key.

Of course, if I can  create good code in Clojure, it  should be convertible to Java without loosing any reusability other than clarity. But this may be irrelevant if the only interested developers turn out to be Clojure programmers.
Reply all
Reply to author
Forward
0 new messages