[lbo-talk] Another computer great passes: John McCarthy RIP

123hop at comcast.net 123hop at comcast.net
Fri Oct 28 10:01:01 PDT 2011


I will attest for the fact that the first time I saw

k = k + 1

my brain blew a fuse. Then I got used to it.

At the same time, having been wading in CS for the last twenty five years, I found ravi's sample more comprehensible.

But also, I pray every day for a great 4GL language. I used one once when I worked for a company named Forte, and I thought it was almost transparent.

Oh, and the only thing I hate worse than Java is XML.

Joanna

----- Original Message ----- From: brandelune at gmail.com To: lbo-talk at lbo-talk.org Sent: Thursday, October 27, 2011 8:38:11 PM Subject: Re: [lbo-talk] Another computer great passes: John McCarthy RIP

On Oct 28, 2011, at 10:40 AM, Fernando Cassia wrote:


> The "everything is a string" approach is pure genius.

Why is that more "pure genius" than "code is data" ?

==========================

To ravi:

Why is recursion not intuitive ? Why isn't polish notation not mainstream ?

Honestly, don't you think that even 6 years old can get that:

(add-everything-that-follows 1 2 3 4 5 6 7 8 9)

is equivalent and easier to handle and smarter and better looking than:

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9

As for recursion (quote from Paul Graham's "ANSI Comon Lisp", p.17):

"A better metaphor for a function would be to think of it as a process one goes through. Recursion is natural in a process. We often see recursive processes in everyday life. For example, suppose a historian was interested in population changes in European history. The process of examining a document might be as follows:

1. Get a copy of the document. 2. Look for information relating to population changes. 3. If the document mentions any other documents that might be useful, examine them.

This process is easy enough to understand, yet it is recursive because the third step could entail one or more applications of the same process."

That's easy enough to grasp. And with a few exercises (like the first part of SICP, and that is really trivial, unlike the rest...) you're ready to work with recursion for the rest of your programming career.

Last but not least, you write :


> void fibonacci(int n)
> {
> int a = 0, b = 1;
> int sum;
> int i;
>
> for ( i = 0; i < n; i++ )
> {
> printf("%d\n”, a);
> sum = a + b;
> a = b;
> b = sum;
> }
> }
>
> My claim is that the second is familiar (from training in middle school Algebra),

But in middle school Algebra you never learn things like i++ or rather i = i + 1. _That_ is impossible in Algebra and that is extremely counter intuitive.

See Armstrong in his "Programming Erlang" (I'm lucky that part in online):

http://media.pragprog.com/titles/jaerlang/GettingStarted.pdf

(search for "Algebra").

In middle school you never have to declare types either. And C does not do fractions. In Lisp (I use gauche, a Scheme implementation) you can have:

gosh> (+ 1/2 2/3) 7/6

How more intuitive can that get ?

JC ___________________________________ http://mailman.lbo-talk.org/mailman/listinfo/lbo-talk



More information about the lbo-talk mailing list