4 ms·
You say that, but it doesn't match my experience at all. I've taught high-schoolers basic Java and they had all sorts of problems with for-loops and procedures.
by tikhonj 14y ago
You say that, but it doesn't match my experience at all. I've taught high-schoolers basic Java and they had all sorts of problems with for-loops and procedures. In fact, it took me a while just to describe what a (mutable) variable was! To many of them, the idea of changing value was not intuitive at all. It didn't help that Java coopted well-known syntax from high-school algebra like x = 10 to mean something completely different.
At my university, everyone started with a Scheme course followed by a Java course. The Scheme course starts out functionally, but never mentions it. People didn't have too many problems there except with recursion, and most of them got that after a couple of lessons.
The Java course? Not so easy! People did have problems with if statements (why is it a statement and not an expression?). They also had problems with figuring out what was a reference in Java and what was passed by value. A lot of problems with that particular facet, in fact. In fact, the people without any programming experience before college had more problems with Java than with Scheme, despite the fact that the Java course was second.
Basically, you're projecting your years of experience with imperative programming onto what you imagine a beginner thinks like. I do not think this is particularly accurate--it certainly doesn't match what I've seen in practice.
For people with literally no programming experience, functional programming is not less natural at all. If anything, it makes more sense, because it fits with the minimal mathematical background everyone has.
- camus 14y agoI began programming with Caml. I found TurboPascal much easier to use. So definetly began with functional programming.