Algorithms should be free from rich types

Ali Çehreli acehreli at yahoo.com
Wed Jun 28 22:23:19 UTC 2023


On 6/28/23 10:38, bachmeier wrote:

 > [Rich
 > 
Hickey](https://harfangk.github.io/2017/12/08/rich-hickey-interview-from-codequarterly.html):

Amen! I've just finished reading most of it (skipped some Clojure 
specific parts).

The following part is worth quoting as well:

   "When we drop down to the algorithm level, I think OO can
    seriously thwart reuse. In particular, the use of objects
    to represent simple informational data is almost criminal
    in its generation of per-piece-of-information
    micro-languages, i.e. the class methods, versus far more
    powerful, declarative, and generic methods like
    relational algebra. Inventing a class with its own
    interface to hold a piece of information is like
    inventing a new language to write every short story. This
    is anti-reuse, and, I think, results in an explosion of
    code in typical OO applications."

One more quote both to stay unkind to my ex-favorite language and to 
relate to our ever-present discussions on the GC's appropriateness in 
libraries:

   "The complexity [of C++] is stunning. It failed as the
    library language it purported to be, due to lack of GC,
    in my opinion, and static typing failed to keep large OO
    systems from becoming wretched balls of mud. Large
    mutable object graphs are the sore point, and const is
    inadequate to address it. Once C++’s performance
    advantage eroded or became less important, you had to
    wonder—why bother? I can’t imagine working in a language
    without GC today, except in very special circumstances."

Ali



More information about the Digitalmars-d mailing list