8 ms·
I understand that Java is verbose and does not have the same "instant" feedback loop that a language with a fully supported REPL has. But I do not agree with th
by rluhar 15y ago
I understand that Java is verbose and does not have the same "instant" feedback loop that a language with a fully supported REPL has. But I do not agree with the assertion that Lisp would be a good substitute for Java as the core instruction language in a University course. If people are having trouble getting their head around Java, I think they would struggle with Lisp. Java, in it's simplest form can be written in a very imperative manner. Most people think sequentially, and if you are getting started with programming, writing a simple little program in Java, IMO, is easier than something like Lisp.
I am not saying Java is better, just that it has less cognitive overhead than Lisp.
I studied both Java and Haskell at University and found it much easier to get going with Java than with Haskell (I hacked lots of QBasic - I am getting on a bit - when I was a kid). Actually, I think a language like Ruby or Python would be much better suited for an undergraduate / dual major than Lisp or Java!
- spacemanaki 15y agoThe authors of How to Design Programs use Lisp (well, Racket/Scheme) and they are some of the most careful and thoughtful CS educators, who are appear to be thinking deeply about CS pedagogy (at least, this is the impression I get from reading some of their papers and some of HtDP). So I wouldn't be so quick to write off Lisp as an intro language over Java. "I studied both Java and Haskell at University and found it much easier to get going with Java than with Haskell (I hacked lots of QBasic - I am getting on a bit - when I was a kid)." I think Java is arguably closer to Basic than it is to Haskell, so this isn't really a very fair or representative data point. (I don't claim that non-programming undergrads taking CS 101 would be more successful if started with Haskell instead of Java, although I believe that's not unheard of).
- rluhar 15y agoThanks for your comment. I will take a look at the book you recommend. To be honest, it has been a while since I was an undergraduate! On a related note - how easy is it to transition from having first learnt how to program in Lisp (or a functional language) to programming in Java or C++? I have seen lots of blog posts about doing it the other way around (Java to Lisp). I would imagine that also requires a cognitive leap ..
- Stormbringer 15y agoThe claim has been made that it is easier to move from a formal education in maths to functional programs. E.g. if you've been dealing with things like f(x)->g(x) in math class for a couple of years, then a functional language is a more natural fit. This is why the iconic learning lisp examples are calculating numbers from something like the fibonacci sequence or factorials, rather than something that is actually useful in the real world. (Which is not to say that fibonacci numbers and factorials aren't useful, but rather that those problems are well and truly thoroughly solved already)
- nessus42 15y agoLisp (Scheme) was the introductory language taught for CS and EE majors at MIT when I started as an undergraduate, and I found it to be the most intuitive language I had ever seen. More recently MIT switched to Python. Either one is a much better choice that Java. I would never have gone into CS if MIT had started us off on Java.