by rluhar · 14y ago · 0 comments
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!
"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).
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 ..
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.
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)