Re: Example of expression bias?

From: Marshall <marshall.spight_at_gmail.com>
Date: 18 Jun 2006 23:49:59 -0700
Message-ID: <1150699799.709877.284970_at_i40g2000cwc.googlegroups.com>


Keith H Duggar wrote:
> Over in c.l.c++.m I ran across this recent example
>

Keith,

Your analysis strikes me as dead-on.

I'll only add one small thing: notice that the OOP approach of bundling structs and functions together (which become classes and methods) means that if you want to have a sort function, you can only have one. (Assuming you want to use '<' as the name.) Really, a sort order is separate from the type it operates on. That leads you away from OOP and into the use of higher-order functions.

I started reading comp.lang.functional a few years ago. It's quite a good n.g. if you are interested in that sort of thing. When I started, I had a lot of trouble following the conversations--so much was unfamiliar. But there was a guy there who I could regularly understand. He was the one guy with a strong OOP background. He impressed me a lot. And one thing he said somewhere along the way was that various OOP idioms he had been so familiar with just fell away to nothing once he started getting the hang of using higher-order functions. I'm not there yet myself; my job is too OOP saturated for me to get much traction with FP, but it's the direction I'm interested in going.

Also note, along the same lines, Peter Norvig's detailed analysis of "Design Patterns in Dynamic Programming." Item #7 at:

http://norvig.com/

(And while you're there, read the humorous #1, "Gettysburg Powerpoint slides.") Ah, I see he's reformatted them better; I'll have to read that again.

Marshall Received on Mon Jun 19 2006 - 08:49:59 CEST

Original text of this message