Live data from Hacker News

Java vs. Scheme in Education

innoq.com

31–40 of 41 posts

Re: Java vs. Scheme in Education

#31

Asking as a CS major who first learned C, then C++, and didn't touch LISP and Prolog until the upper divs, how difficult is it to learn a functional language as your first programming one? Wouldn't it be trippy? When I first learned that Berkeley students had to learn Scheme first, it made me think of them as hardcore... though I may be overestimating its difficulty.

I made an abortive attempt to learn C++ by myself long ago, and was frankly scared of programming for a while because of it (was fine with BASIC, but.. a good idea of how I felt: http://www.qwantz.com/index.php?comic=1178).

But a couple months ago I decided to give it another go with Scheme and I have been pleasantly surprised by how much more natural it seems to me. I'm having fun!

Re: Java vs. Scheme in Education

#32
post #27
post #22

Earlier quoted context omitted.

>I'm not sure I understand you. You can't just start typing and getting instant feedback in Java simply because Java is not interpreted (well, actually, it is, but you have to compile to bytecode first). So, what you're saying about Java goes for just about any compiled language. This is not true. There are statitically typed languages, usally functional, with a read-eval-print-loop. Haskell, Ocaml, SML, F#, Scala ar…

After googling for a while, I found this great answer on SO: http://stackoverflow.com/questions/3265357/compiled-vs-inter... Lunaryom is correct. There are no 'interpreted' and 'compiled' languages, just different implementations. So, I was wrong in my original post. It would appear that you can just type and get instant feedback in Java (if you use Beanshell, for example).

I noticed the possibility of that semantic ambiguity, that is why I switched to noting static/dynamic typing instead of retaining your distinction on compiled/intepretated.

Re: Java vs. Scheme in Education

#33
post #17

Asking as a CS major who first learned C, then C++, and didn't touch LISP and Prolog until the upper divs, how difficult is it to learn a functional language as your first programming one? Wouldn't it be trippy? When I first learned that Berkeley students had to learn Scheme first, it made me think of them as hardcore... though I may be overestimating its difficulty.

> though I may be overestimating its difficulty. The difficulty could be due to the brain damage C++ causes. Before I get incinerated, I have to remind you of Dijkstra quote about BASIC ("mutilates the mind beyond recovery"). Both BASIC and C++ (and Java, Smalltalk and so on) fixate several ideas about computing that make it harder to understand very different concepts. In a sense, that qualifies as mild brain damage…

Incidentally, my school's (optional) introduction to programming course teaches Python.

Re: Java vs. Scheme in Education

#34
post #17

Earlier quoted context omitted.

> though I may be overestimating its difficulty. The difficulty could be due to the brain damage C++ causes. Before I get incinerated, I have to remind you of Dijkstra quote about BASIC ("mutilates the mind beyond recovery"). Both BASIC and C++ (and Java, Smalltalk and so on) fixate several ideas about computing that make it harder to understand very different concepts. In a sense, that qualifies as mild brain damage…

Incidentally, my school's (optional) introduction to programming course teaches Python.

That's a good way to create a generation that utterly hates Java ;-)

Re: Java vs. Scheme in Education

#35
post #8

Earlier quoted context omitted.

I think the point is that, with Scheme, the tool you use is less important than the thinking you do. With Java, you have to worry about your environment before you can worry about programming.

With Java, you have to worry about your environment before you can worry about programming. You have to download the jdk and set an environment variable. Then open a text editor. That's about all the 'worrying about the environment' that you have to do before you can start programming in Java.

Exactly. If it's starting from scratch, I have to download the scheme source, build it, resolve all compile problems within my environment before I can use it.

Re: Java vs. Scheme in Education

#36
post #25

Earlier quoted context omitted.

Same point PG made in one of his essays about text editors vs IDE's. With the former you learn and master the language, with the latter you learn the editor and features like code completion substitute for mastering the language.

This is utter bull, even if PG said it. I've learned a huge amount about Java by using an editor (Intellij) that has real time static analysis of my code and points out when I'm making common mistakes with corners of the language (calling overrideable methods during object construction, for example). It's incredibly useful and informative.

Eh, was Oliver Steele, not PG. Old essay, somehow I started attributing it to PG instead:

http://osteele.com/archives/2004/11/ides

Perhaps out of date now, given what IDE's can do, though I personally still prefer to learn a language and toolchain with a text editor, then graduate to Eclipse for the benefits you mention.

Re: Java vs. Scheme in Education

#37
post #25

Earlier quoted context omitted.

Same point PG made in one of his essays about text editors vs IDE's. With the former you learn and master the language, with the latter you learn the editor and features like code completion substitute for mastering the language.

This is utter bull, even if PG said it. I've learned a huge amount about Java by using an editor (Intellij) that has real time static analysis of my code and points out when I'm making common mistakes with corners of the language (calling overrideable methods during object construction, for example). It's incredibly useful and informative.

> I've learned a huge amount about Java

But did you learn a huge amount about programming?

Re: Java vs. Scheme in Education

#38
post #21

Earlier quoted context omitted.

No, you also have to think about various command-line tools invocation (java and javac for starters) and all the boilerplate that goes around what you want to write (create a file, name it correctly, put the same name inside with a `class` statement whatever that means, then put braces everywhere and a `main` and a `String[]` which you don't know jack about) and then you have the joy of wondering why you don't see an…

I'm not sure I understand you. You can't just start typing and getting instant feedback in Java simply because Java is not interpreted (well, actually, it is, but you have to compile to bytecode first). So, what you're saying about Java goes for just about any compiled language. No, you also have to think about various command-line tools invocation (java and javac for starters) Use "javac" to compile to byte code. Us…

> You can't just start typing and getting instant feedback in Java simply because Java is not interpreted (well, actually, it is, but you have to compile to bytecode first).

This is a great excuse, but uninteresting in discussing the relative fitnesses of Java and Scheme for teaching. Unless you want to take Java down one more peg.

> So, what you're saying about Java goes for just about any compiled language.

That's not even correct, many compilable languages also have REPLs, any compiled language can be interpreted (you just have to compile it on the fly). Haskell and OCaml can be used in a REPL, so can Erlang (though the Erlang console is quite far from a full repl).

> Use "javac" to compile to byte code. Use "java" to run your compiled program. This is all you need to know about these tools to start programming.

That's actually quite a lot, compared to "launch this, and then start playing". And you have to invoke `javac` for every single source file and with the correct options (the main issue for beginners generally being the classpath configuration).

> There are various options for using java and javac, of course, but it's not like you can't compile and run a simple program without these options.

You can run a trivial program without most of these options, but to reach simple you'll very likely need -cp early on.

> Yeah. You have to know a bit of Java before you actually start programming in it. If that's one of Java's shortcomings, well then, there are a lot of languages with the same shortcoming.

Yep. And that makes them worse teaching languages. I am happy you agree.

Re: Java vs. Scheme in Education

#39
post #35
post #8

Earlier quoted context omitted.

With Java, you have to worry about your environment before you can worry about programming. You have to download the jdk and set an environment variable. Then open a text editor. That's about all the 'worrying about the environment' that you have to do before you can start programming in Java.

Exactly. If it's starting from scratch, I have to download the scheme source, build it, resolve all compile problems within my environment before I can use it.

Because you don't have to download the JDK source, build it and resolve all compilation issues with your environment before using java "from scratch"?

Re: Java vs. Scheme in Education

#40
post #35

Earlier quoted context omitted.

Exactly. If it's starting from scratch, I have to download the scheme source, build it, resolve all compile problems within my environment before I can use it.

Because you don't have to download the JDK source, build it and resolve all compilation issues with your environment before using java "from scratch"?

The usual distribution package of scheme is the source package. The usual distribution of JDK is the installable bundle. If the argument for scheme is that it's already installed and set up by the admin, then the same thing can be said about JDK. In term of ease of setup or installation to the end users, it's about the same.

Once the JDK and environment have been set up by the sys admin, the tools are just available to the end users.

Post reply on HN