Re: Retired programmer wants to learn programming



On Sun, 29 Jan 2006 13:01:14 +0000, Gerry Quinn wrote:

> In article <1138485133.589739.196200@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
> snarflemike@xxxxxxxxx says...
>> Thanks to everybody for the various suggestions. I found a comment in
>> Paul Graham's ANSI Lisp book online that applies to what I'm looking
>> for:
>>
>> "Programming languages teach you not to want what they cannot provide.
>> You have to think in a language to write programs in it, and it's hard
>> to want something you can't describe. When I first started writing
>> programs-- in Basic-- I didn't miss recursion, because I didn't know
>> there was such a thing. I thought in Basic. I could only conceive of
>> iterative algorithms, so why should I miss recursion?"
>
> I would describe it as not understanding the language he was using. All
> BASICs have provided recursion in some form. It may have been somewhat
> limited on very primitive versions, but I have never heard of a version
> that did not allow functions or subroutines to call themselves.

The original quoted sentiment was not well put but it can be simply
rephrased and the point still stands. For example the author might have
said: "I thought in Basic. I could only conceive of named subroutines, so
why should I miss higher-order functions?"

There seems to be generally held view (so please note I am not ascribing
it to you -- I have no idea -- it was just you post that made me thing of
it again) that apart from all those blasted brackets the only thing that
separates functional-lispish-up-themselves langues like Scheme and Haskel
from down-to-earth-realistic-practical ones like C and Java is that one
set has recursion and the other interative loops.

This difference is really just a consequence of having promoted the notion
of a function so that its uses are not constrained. As a result, all
sorts of programming patterns can be captured without the need to add
further concepts (like loops).

There was another thread where the notion of recursion was pitched against
looping to see which was more "natural" or "intuitive". I'd say that
neither is. There very little we do as a species that is less intuitive
than programming, so neither has a strong claim. If Scheme is a "better"
language (for learning) than, say, Java it is be because it can express
higher-level ideas and programming patterns. You don't learn more with
it, you learn deeper. (I don't know Java -- it might well have
first-class functions etc. in wich case substitute C in the above and I
will go and learn Java.)

--
Ben.

.



Relevant Pages

  • Re: CAS, Lambda Calculus, Continuation and Functional Programming
    ... There are no expressions in Fortran or Pascal??! ... expressions are programming language constructs that return a value. ... > languages don't have recursion. ...
    (sci.math.symbolic)
  • Re: Interesting article by Joel Spolsky: The Perils of JavaSchools
    ... Sounds like recursion to me. ... special purpose language - maybe they are not needed. ... >> This corresponds best to my second example of iteration. ... I am not wild about Java, ...
    (comp.programming)
  • Re: Original Macbook OS died. now no space on HD but also no way to rebuild?
    ... It is very easy to learn to write a program using .net or java. ... learning any language takes longer than a paragraph. ... programming environment is much easier to learn compared to modern ... could compile Java at all. ...
    (uk.comp.sys.mac)
  • Re: Static vs Dynamic
    ... (Java has too much noise in its source code, ... lot to ask and is typical in a typed language supporting polymorphism. ... > developers can easily learn the Java programming language; ... > obivous bugs slip through and b) in many cases, ...
    (comp.lang.lisp)
  • Re: Hobby languages
    ... Because 100 out of 100 Java "programmers" have no idea what the ... English with someone whose native language is Swahili, ... of programming and requiring bloated resources. ... COBOL IS commonly found on the PCs of people who are interested in COBOL. ...
    (comp.lang.cobol)