Reuse is a matter of perspective. During the OO marketing blitz of the 90's, promise of re-use (C++, etc etc) convinced many to jump in the pool. So today there is a tremendous amount of abstract and deep hierarchies build with the notions that: "Someday this may be useful to specialize from this Class thereby enabling 're-use'" ... *BS!!!! There is much more code that does NOTHING in the hierarchy other than putting a drag on the timeliness of delivery.*
True reuse emerged at the macro level (i.e.Module orientation, Re-provisionable services, Web Services, etc.) while the micro level adventure leaving bloated unmaintainable artifacts in it's wake. The fundamental essence of functional approach has done more for reuse at the micro level then all OO languages combined. IMHO. Off peanut gallery soap-box Frank On Thursday, October 1, 2015 at 9:14:34 AM UTC-4, William la Forge wrote: > > Code reuse is for me the holy grail of software. It is something we lost > in large measure with the adoption of top-down development. And OO has only > complicated the matter. For some time now I have advocated the use of > factories and interfaces as a means of decoupling, but writing reusable > code has continued to be a bit of a lost art. But then, I was a Java > developer. > > > Having been exposed to Clojure, I've come to realize that a function is > the smallest unit of reusable code, not a class. Simply moving logic from > methods to functions (or to static methods, if you are still using Java) > opens up a lot of possibilities. Mind, I still advocate the use of > interfaces for method polymorphism, but limit method bodies to be little > more than a call to a function or a property accessor. > > > Doing this allows us to avoid class extensions and mind-numbing class > hierarchies. The code becomes much clearer, defining new classes becomes > much easier, and the need to refactor the code is greatly diminished. And > writing reusable functions is much easier than writing reusable classes. > > > from https://github.com/laforge49/aatree/wiki/Towards-Greater-Code-Reuse > -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.