Live data from Hacker News

Dijkstra on Haskell and Java (2001)

chrisdone.com

91–100 of 253 posts

Re: Dijkstra on Haskell and Java (2001)

#91
post #63
post #42

Earlier quoted context omitted.

I disagree. The whole point of abstraction is that you don't have to care about the underlying mechanisms (although most non-trivial abstractions are leaky as Joel Spolsky has written about). For instance, someone who writes assembly should not have to know how a transistor works. A course in introductory programming similarly should not be about how a processor works.

It's trivially easy to write perfectly valid looking Haskell programs that are abysmally slow because of how they are actually executed, and since the reason for this can't be explained at a level of abstraction of such a course, people learn to treat the language as a closed black box, while you can't really competently use any language without understanding its execution model. Abstractions are fine, but you have t…

Changing naive recursion to tail recursion is a very common optimization in functional language compilers.

Re: Dijkstra on Haskell and Java (2001)

#92
post #33

To me there seems to be something wrong with using as the first language something that depends on a very, very complicated runtime and execution model to run on the hardware we currently are using. This way people end up viewing programming languages as some God-given black box and not just something another computer program written by another person provides for you. I think CS students should instead start by lear…

I'm an advocate of assembly language on microcontrollers being an introduction to programming. PICs are great because they are cheap, basic tooling is cheap, and the instruction set is small.

It gives a student a period of getting familiar with computers as machines, rather than brands or software stacks. Plenty of time in the rest of your life for that.

Re: Dijkstra on Haskell and Java (2001)

#93
post #16

Dijkstra assumes that students will already have been exposed to imperative languages before joining university, and will appreciate the change. I think that this assumption might leave behind students that have not yet been exposed to any programming (that stuck). Over in the UK I certainly hadn't encountered anything more complicated than html before I hit university, and was very happy with sticking with Java for…

> might leave behind students that have not yet been exposed to any programming And good riddance. If you make it to university without exposing yourself to your subject as a matter of passion (and few subjects are more easily approached by hobbyists than programming) you're going to waste your time there. University is a not a "school" you attend for learning a subject. You can't show up for English Literature if yo…

That's an extremely elitist and exclusionary attitude you have there. Your post is also "begging the question". According to you, people interested in said subject should already be experts by the time they reach university. This is of course flat out wrong, as there are many counterexamples of people mastering and contributing new knowledge of a subject, many many years after attending university. I think you need a reality check.

Re: Dijkstra on Haskell and Java (2001)

#94
post #33

To me there seems to be something wrong with using as the first language something that depends on a very, very complicated runtime and execution model to run on the hardware we currently are using. This way people end up viewing programming languages as some God-given black box and not just something another computer program written by another person provides for you. I think CS students should instead start by lear…

> CS students

I think CS students should be taught computer science, not software engineering.

Re: Dijkstra on Haskell and Java (2001)

#95
For serious students of the subject, kicking off with an unusual language can be helpful. As another noted: if the student hasn't even started programming prior to college, s/he is likely not of a succeeding mindset as the bulk of other students already grasp programming.

Starting college, I'd already learned assembler, BASIC, and Pascal - all what Dijkstra was warning against over-ingraining; proceeding to C would have been sensible but entrenching. Fortunately Syracuse University then was starting students on something very strange: APL. That was a mind-opener I needed at the time, and recommend such non-procedural/OOP language very early on for serious students.

Re: Dijkstra on Haskell and Java (2001)

#96
post #77

The worst thing I have observed is colleges choosing Java (and C#) "because that's what the market demand". When I was in college (1986, engineering, not compsci) students started with 8-bit BASIC and FORTRAN (I mostly skipped classes on BASIC because I had learned to program on my Apple II). One year later, they switched from BASIC to Pascal. Later on, one of the teachers decided to teach APL. It was a wonderful exp…

If my Apple II booted into Eclipse, I'd have gone into cinematography.

That's an awesome punchline.

Re: Dijkstra on Haskell and Java (2001)

#97
post #16

Dijkstra assumes that students will already have been exposed to imperative languages before joining university, and will appreciate the change. I think that this assumption might leave behind students that have not yet been exposed to any programming (that stuck). Over in the UK I certainly hadn't encountered anything more complicated than html before I hit university, and was very happy with sticking with Java for…

What year did you enter university? I know the number of kids exposed to programming before university now is much higher than it was when I entered in 1996. I think it's safe to assume (but would love to have some real data) that most CS freshmen these days have dabbled with at least one of the mainstream imperative languages before they hit uni.

I have some younger (sigh ;) friends in the UK attending uni CS now and almost no-one actually ever touched a programming language. Computers, sure but programming no. Same as when I went to uni mid 90s; I remember of the 80 students 3 (including me) had programming backgrounds. Most were there because 'you earn a lot' as a programmer. Don't think that much has changed, at least not in some universities. A lot of these people switched to law or psychology after a few months to 1 year because, well, CS is hard enough if you actually have no problem with the practical assignments; people who never programmed generally experienced a lot of pain and had to put in a lot of effort to do them.

Re: Dijkstra on Haskell and Java (2001)

#98
post #33

To me there seems to be something wrong with using as the first language something that depends on a very, very complicated runtime and execution model to run on the hardware we currently are using. This way people end up viewing programming languages as some God-given black box and not just something another computer program written by another person provides for you. I think CS students should instead start by lear…

I think you are placing too much emphasis on the start of one's education.

Pick a place in the stack. Start learning. Over time you should go up and down the stack, building understanding as you go.

This can be done from many places in the stack.

Re: Dijkstra on Haskell and Java (2001)

#100
Here's a positive report on teaching "back to basics" first-semester programming with Java. They only teach procedural concepts and no OO at all. The point is, while Java itself is non-ideal for this and slants towards OO, you can just ignore that part and teach with it anyway.

Lots of people here have raised concerns that the way Java forces class and static declarations is confusing for beginners. Interestingly, the instructors were concerned about that too, but found that students don't seem to mind.

http://homes.cs.washington.edu/~reges/sigcse/basics.pdf

http://homes.cs.washington.edu/~reges/sigcse/basics.ppt

The second major concern being discussed here, that functional programming isn't possible in Java, I think is a non-issue for a true introductory first-semester class, which needs to focus on more basic issues of procedural programming and abstraction. The SICP approach is beautiful and great for already advanced and highly motivated students, but that's honestly a small minority.

(You can find many more examples of reports like this if you search for "CS1", which is the shorthand for intro-to-CS that's used in the CS education literature.)

Post reply on HN