On 03/01/12 7:14 AM, Liam Proven wrote:
On 3 January 2012 04:16, Toby Thain<toby at
telegraphics.com.au> wrote:
On 02/01/12 10:00 PM, Mouse wrote:
>
> I consider BASIC to be an excellent beginner's introduction to "what
> is a program?", etc., so long as they are exposed to other languages
> immediately after grasping the basic principles.
Well, there is the "small" problem that BASIC syntax, data types, and
control structures relate poorly to modern languages and even less to
powerful abstractions.
I'm not convinced that's a problem.
What's wrong with Scheme? Or at worst,
Python?
The same thing that was wrong with the New Math: you don't dump the
full load of theory on a beginner, not unless you want a very confused
beginner, or you have the incredible luck to get a Ramanujan or Knuth
as a student (and if so, honestly, the best thing anyone can do is to
get the hell out of the way).
Scheme has no more theoretical load than BASIC.
O_o So speaketh a *highly* intelligent, perhaps near-genius-level,
natural programmer.
Of course, I meant to qualify this as: "for a beginner", which is the
point here.
Since modelling and abstraction are far more important parts of
"programming" than syntax, BASIC fails completely:
- full of irrelevant lexical bullshit and limitations (line numbers?
what good is this to a beginner?);
- numbers, strings, fixed length arrays? that's it? How do I build
anything else? Oh right. I can't.
- most BASICs lack structured programming primitives, so even as an
IMPERATIVE language it fails to teach important patterns from the 1980s
(which might explain some of the code I see around the place);
- lacks named functions & procedures (yeah, some BASICs have a
crippled hack for this; see lexical bullshit above) - a fundamental
abstracting/factoring tool.
- etc, etc.
Now with Scheme,
- you start with a syntax that is not pedagogically toxic;
- you have the breath of a hope of constructing useful data structures
without artificial limitations which can only frustrate;
- there is the opportunity to introduce more theoretical load, which
is good. The door is always unlocked to go beyond where one already is.
There is nothing here that cannot be taught to a high school age student.
I have only read a tiny little bit about Scheme but it
is virtually
impenetrable to me - and I have years of programming experiences,
And that is EXACTLY what Dijkstra was on about.
The conclusion YOU come to is that Scheme isn't relevant to programming.
But in fact the opposite is true: A good part of what you have been
indoctrinated with, from BASIC onwards, *obscures* what is really going
on when you program. Programs are not "sequences of instructions" except
at the absolute bottom-most level.
We do not need *another* generation of programmers for whom recursion
and higher-order functions are alien concepts. Worse: Not given proper
tools, mental and literal, for modelling and abstraction. Abstraction,
it can be argued, is the single most important idea to learn as a
computer programmer.
I too learned with assembler, BASIC, Pascal, C, and so on; but I didn't
really learn anything except how to navigate limitations. Ugh. If only I
had picked up Scheme when I picked up C.
albeit poor quality programming, and have been
competent in 4 or 5
languages: umpteen BASICs, Pascal, Fortran, C shell, and arguably
rudimentary C. I have yet to find an explanation of the lambda
calculus that is remotely comprehensible to me, as a smart, educated
man with extremely rich and deep IT experience.
Seriously, most people are not very smart. BASIC has a fairly low
entry level - the learning curve is modest. The reason that most of
the other "teaching languages" designed to replace it haven't worked
out on anything like the same scale. (E.g. Logo, Scheme)
Concepts such as local versus global variables, scope, recursion and
so on are complex, difficult stuff unless someone is both very very
Actually none of these are more difficult than the artificial hurdles
BASIC puts in front of you. Once again you speak from your confessed
"imperative place".
Now imagine that you had learned Scheme first. Would you say recursion
was hard? How will you program effectively in 2030 without dealing with
higher order functions, continuations, immutable state? (How can one do
it today, for that matter; only because in software Things Move So Damn
Slowly.)
Kids being educated for a career in software starting today deserve
something better than BASIC. Things are bad enough already.
--Toby
smart and deeply embedded in computational and
mathematical "culture".
Any language which puts these front and centre is quite simply /too
hard/ for mere mortals to learn.