[plt-scheme] OOP as a gateway to FP.

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Tue Mar 22 15:33:23 EST 2005

1. I don't believe that anything in your claims is _inherently_ true 
about these languages. In other words, they don't _force_ you to do 
"fat" interfaces or "thin" ones, etcetc.

2. I must admit that I am also discussing this at the level of _ideals_ 
not _existing languages_. (If you're old enough to remember the 
comparisons of _capitalism_ vs _communism_. People in the 60s routinely 
compared _real existing capitalism_ with _the true idea of communism_.) 
  I will freely admit that the clumsiness of existing languages has a 
different effect on people's mind and their programming approaches.

-- Matthias

"Though [it] came from many motivations, two were central. ... [T]he 
small scale one was to  find a more flexible version of assignment, and 
then to try to eliminate it altogether."  Alan Kay (1993)

On Mar 22, 2005, at 2:04 PM, R. Clayton wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>   I claim that if OOP were taught properly, i.e., according to the 
> standards of
>   Smalltalk, moving from OOP to FP wouldn't be too difficult either.
> Here's the experience that leads me to deny your claim: write a simple 
> tbl-like
> formatter to keep columns nicely lined up as the column-element widths 
> vary.
> After three go-arounds, my Smalltalk solution is still disgusting, 
> while my
> Guile solution (written between the first and second Smalltalk 
> go-around) was
> neat and clean and completely uninfluenced by my Smalltalk solution 
> (however,
> the Guile solution did influence the following Smalltalk solutions, 
> which is
> partially why they're still disgusting).
> In my view, functional programming has the power of thin and flexible 
> (and
> sharp) interfaces, comprising a pleasant semantics, first-class 
> higher-order
> functions, pattern matching and such like.  Object-oriented 
> implementations,
> however, have thick and clumsy interfaces (at least with respect to 
> clients;
> the parent-child interface is another, but no better, matter) and the 
> only
> semantically useful idea - subtype polymorphism - is compromised by 
> other
> semantically dubious features (such as inheritance), as is illustrated 
> by, for
> example, the fragile base-class problem and its various solutions.
> I interpret your claim as being analogous to claiming that the best 
> way to
> train surgeons is to start them off in boxing gloves.  Although I'm 
> willing to
> grant that it might be true, I'm even more willing to grant that the 
> odds are
> running heavily in the other direction.

Posted on the users mailing list.