Live data from Hacker News

Dijkstra on Haskell and Java (2001)

chrisdone.com

1–10 of 124 posts

Re: Dijkstra on Haskell and Java (2001)

#2
My main problem with teaching CS courses in Java was that it produces folks who have no clue about pointers or memory management in general. This however applies to Python and Haskell as well. I personally had a strange mix of Java, x86 assembly and Ruby in my curriculum.

Re: Dijkstra on Haskell and Java (2001)

#4
I agree with him in the sense that these are CS courses, and in in such a way Haskell ties together well with the math that one learns in a CS program. Keeping that in mind it makes sense to only have taught Java in courses specifically designed for developing software.

Re: Dijkstra on Haskell and Java (2001)

#5

My main problem with teaching CS courses in Java was that it produces folks who have no clue about pointers or memory management in general. This however applies to Python and Haskell as well. I personally had a strange mix of Java, x86 assembly and Ruby in my curriculum.

I was lucky to get a mix of C, Java, and Haskell. Unfortunately (to my detriment) I totally ignored Haskell, and it didn't really click until I picked it up at the end of my degree out of curiosity- it really does help to clarify one's thinking.

I think teaching the motivation for learning it before beginning would have been better than just throwing it at freshmen, but I can't truly blame anyone other than myself.

Re: Dijkstra on Haskell and Java (2001)

#6

My main problem with teaching CS courses in Java was that it produces folks who have no clue about pointers or memory management in general. This however applies to Python and Haskell as well. I personally had a strange mix of Java, x86 assembly and Ruby in my curriculum.

That's like saying "The problem with teaching people how to drive cars is that at the end, they don't know how to ride motorcycles".

There are plenty of other classes at the grad and undergrad level that teach you about lower level concepts such as pointers and memory (system, C, OS, ...). The Java classes teach different concepts.

Re: Dijkstra on Haskell and Java (2001)

#7

My main problem with teaching CS courses in Java was that it produces folks who have no clue about pointers or memory management in general. This however applies to Python and Haskell as well. I personally had a strange mix of Java, x86 assembly and Ruby in my curriculum.

A classic curriculum in functional programming, which goes back as far as SICP and is continued in modern books such as PLAI, is to build an interpreter for a programming language. This forces issues like memory management to be discussed.

Re: Dijkstra on Haskell and Java (2001)

#8
I don't see why they don't just teach C, x86, and Haskell everywhere. If you know the concepts behind these, you can quickly grok any other programming language. Also I never got the whole hype behind OOP. IMHO its self explanatory, nothing you need an entire course on to be effective and understand OOP programs. Memory layout and management, advanced pointer concepts and monads are a slightly different matter.

If I had to teach someone OOP I'd say, OOP is like the real world if it were made of puppets and every puppet could pull another puppets strings, pull a string and a dog barks and wags its tail causing a cat to meow, the key is just not tangling up your strings.

Re: Dijkstra on Haskell and Java (2001)

#9

My main problem with teaching CS courses in Java was that it produces folks who have no clue about pointers or memory management in general. This however applies to Python and Haskell as well. I personally had a strange mix of Java, x86 assembly and Ruby in my curriculum.

That's like saying "The problem with teaching people how to drive cars is that at the end, they don't know how to ride motorcycles". There are plenty of other classes at the grad and undergrad level that teach you about lower level concepts such as pointers and memory (system, C, OS, ...). The Java classes teach different concepts.

I never got C or C++. The OS course, sure, but it was awfully theoretical and we didn't get to code all that much. Depending on the rest of the curriculum you should probably decide what to use to teach introductory CS.

Re: Dijkstra on Haskell and Java (2001)

#10
post #4

I agree with him in the sense that these are CS courses, and in in such a way Haskell ties together well with the math that one learns in a CS program. Keeping that in mind it makes sense to only have taught Java in courses specifically designed for developing software.

I am looking forward to the day the notion that functional languages are not suitable for developing software will die.

It is not only that functional languages are more succinct, easier to reason about and are more readable, they also often come with significantly better type systems. Some have type systems sophisticated enough to specify nearly all the legal states and guarantee these are the only states the program can stay in at compile time. One can look at languages with dependent types for that.

On the more practical front, Erlang proved itself over three decades to be one of the best choices when it comes to fault-tolerant, highly concurrent systems. Jane Street is using OCaml for all of their trading software, Morgan Stanley has moved to Scala, and so on and so forth.

Post reply on HN