My 1.5 cents: - code re-use is easier in FP because of the common abstractions - sequences etc. - code re-use is easier in FP because of the separation of state and functions - knowledge learned from creating a piece of code is far more likely to be re-used than the code itself - refactoring for code re-use is often _the_ definition of early optimisation - code re-use will never take off because we are all hard-wired to build our own solution - service re-use - yep
My soap-box just collapsed under the weight of my unfounded assertions so I’m out. > On 2 Oct 2015, at 14:53, Frank Castellucci <frankiec...@gmail.com> wrote: > > 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 > <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 > <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 > <mailto:clojure+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- 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.