
On 9 Oct 2007, at 9:10 am, jerzy.karczmarczuk@info.unicaen.fr wrote:
* Scheme is very different from what we practice (C++, Fortran, etc., you know the song...) It may slow down the *adaptation* of students. They *will need* all that imperative stuff you hate. But, as a first language, the FLs condition the young minds in a way we do not appreciate.
The only empirical evidence I'm aware of about this comes from Monash University, Caulfield campus, in Melbourne, Australia. (A former polytechnic amalgamated with a university.) If memory serves me correctly, students there used to do 3 semesters of COBOL. Rob Hagan changed this to 1 semester of Scheme followed by 1 semester of COBOL. (It is about 10 years since I last saw him, so my memory is getting fuzzy. I'm sure about 1 semester of Scheme.) The interesting thing is that with *less* time spent on COBOL, his students mastered *more* COBOL. So in the one case that I have any personal knowledge of, learning Scheme first *speeded up* the adaptation of students. Three things may be of particular interest here. 1. Scheme has set! and vector-set!, so it is closer to the imperative world than Haskell; not least in I/O. 2. Rob Hagan put a lot of effort into providing a single-stepper on PCs that showed exactly what a Scheme program was doing. Here again, insight gained into execution of strict functional code can be expected to carry over to insight into the execution of C, or Fortran, or Java. Haskell would not help here. 3. Rob Hagan encouraged (no, in some cases *required*) students to include test cases in their source files and had a simple test harness for using them. Incredibly easy to use. There *is* a Haskell equivalent of this, namely QuickCheck.
There is no lazy untyped language.
Yes there is. S. There is an open source version of S called R. S(R) is dynamically typed. Function arguments are *always* passed unevaluated. It looks imperative, but if you ignore S4 objects it's basically functional. An assignment like a[i] <- x is defined to have the meaning a <- "[<-"(a, i, x) and if you have previously done b <- a, b will not be changed. S has been enormously successful in its application area (statistics programming).