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

// ravi ravi at platosbeard.org
Thu Oct 27 18:24:38 PDT 2011


On Oct 27, 2011, at 7:00 PM, Tayssir John Gabbour wrote:
> On Thu, Oct 27, 2011 at 5:22 PM, // ravi <ravi at platosbeard.org> wrote:
>>> Barring disability or other misfortune, your post leads me to
>>> believe that you can choose to be a senior software developer ...
>>
>> And what makes you so sure that I am not a senior software developer?
>
> I imagine you are, but of course can't be 100% sure. (Would be awful
> if you're homeless or something, unable to hold a job, and here I am
> arguing with you while you're just trying to entertain yourself. And
> it's odd that a privileged senior software dev would joke on leftist
> forums about being a prole, and make fundamental errors about
> languages despite being offered evidence.)

I think this is the first post where you have actually addressed the issue (about languages). Previously you quoted Crockford, Eich others and the Clojure guy for extra credit to suggest that I am part of some ugly side to programming! Now along with the gratuitous stuff (“fundamental errors”) you have responded to my content. My thoughts: I did not say Lisp is not an imperative language. I compared it to what are traditionally called imperative languages: C, C++, Perl, etc. Yes, I am not an expert on programming languages, and I am not trying to pretend to be one. Nonetheless, a Google search or my own instruction at college (which included a couple of graduate courses in AI, some Lisp stuff, and a built from scratch compiler that implemented a subset of Ada and spat out x86 assembly) tell me that I am committing no fundamental error in calling Lisp (CL) a functional language. At any rate, those are terms I am using to denote the things, and it is the particular thing that I am concerned about: Lisp/Haskell/etc vs C/Perl/etc. My claim is somewhat easily verifiable by just examining the implementation of some function in C/Perl vs Haskell/Clojure/Lisp.

This is a bit of Clojure code that generates the Fibonacci series, that I lifted off an IBM publication:

(defn lazy-seq-fibo

([]

(concat [0 1] (lazy-seq-fibo 0 1)))

([a b]

(let [n (+ a b)]

(lazy-seq

(cons n (lazy-seq-fibo b n))))))

Here’s the rough equivalent in C (this one prints the results), without recursion, also lifted off the net:

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), readable and repeatable. The first is likely more elegant and clever, but also more obscure (starting from the Polish notation). I think there are consequences to these differences, and choosing one over the other, even though these consequences were in no way intended.

Nor do I think that people need to know lambda calculus or monads to program in Lisp. I have programmed in Lisp. I was terrible at it, admittedly. I knew the lambda calculus, but not because of CS or Lisp, but I did not know most of the other terms that are tossed about. What I did say was that such concepts and jargon enter early and are emphasised in the literature, just as a whole slew of terms and concepts confront a novice programmer when it comes to OO programming. It is my contention that this creates a barrier. If you managed to learn Lisp on your own and without being faced by a barrage of abstractions (or despite/because of them), more power to you. That has not been my experience, personal, and when it came to witnessing the education of undergraduates (or coworkers).

I could be wrong about all this. I bring it up here on LBO because of two reasons: one, well, it’s interesting to discuss this stuff, and second, I do think there are political considerations. I think it is not a matter of coincidence that non-CS folks were able to jump into the field (in particular web programming) easier with the advent of interpreted [imperative] languages, and the simple[r] UI paradigm of HTML (and later CSS), the same material used to build pretty complex software. The same is true of even Ruby or Python, neither of which gained prominence until CS minded programmers decided that “scripting” languages were too useful to resist.

Perhaps my first post set this thread off on the wrong path. Definitely it is not trivial to come to agreement on the ease of use, underpinnings, etc., of a language (leave alone the implications of such ease of use).

—ravi

P.S: Given that my own favourite language, Perl, is on its deathbed, I have been tossing around for something that won’t return me to the dark ages before PCRE. There are things about Python - such as the white space business - that set my teeth on edge. I am thinking of Ruby, partly in the hope that it will keep me employable into my upcoming final decades. But Clojure or Scala or Haskell look very interesting.



More information about the lbo-talk mailing list