Live data from Hacker News

Dijkstra on Haskell and Java (2001)

chrisdone.com

11–20 of 124 posts

Re: Dijkstra on Haskell and Java (2001)

#11
post #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…

I love the analogy. I'll use it with my freshman students.

Re: Dijkstra on Haskell and Java (2001)

#12

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.

Dijsktra isn't suggesting that the entire computer science curriculum be taught in Haskell. That would be impossible. He's saying only that the introductory course in programming paradigms be taught in Haskell. Haskell and Scheme are well-suited to such a course.

Re: Dijkstra on Haskell and Java (2001)

#13
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 progra…

I suppose you are correct, although all the training I received for software engineering was in straight OOP Java. I really dislike java in general.

Now I write mostly in python and go, learning a bit of haskell.

Re: Dijkstra on Haskell and Java (2001)

#15
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 progra…

That day will come, for many of us, when a large AAA game, web browser, or usable OS is written in a FP language.

And I realise that is an unfair target, but there is very little user facing FP software. The only one I can think of I have used is xmonad, which is both hard to use and fairly buggy

Re: Dijkstra on Haskell and Java (2001)

#16
post #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…

In that sense imperative programming is equally hyped. It too is like the real world, first you do this then you do that. Similarly there is nothing fancy about functional programming since algebra and calculus already introduce the ideas of composing smaller things to get bigger things.

What I'm getting at is that computation exists on several planes of abstraction and maybe covering C, x86, and Haskell might give you a good overview it will still leave things hidden because there is also Prolog and the branch of computation that Prolog leads to. Most schools settle for teaching their students the theory and some marketable skills by sticking to well-known languages like Java and Python.

Re: Dijkstra on Haskell and Java (2001)

#18
post #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…

The problem is, people finish their CS study, and do not have such level of knowledge that they could start working right away. So Haskell might be nice, but is hardly a sought for skill. Sure if students would learn different stuff by themselves, they could learn useful skills too, but most of the students are lazy, and only learn what they have to.

Re: Dijkstra on Haskell and Java (2001)

#19
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 progra…

Neither Erlang nor OCaml bring with themselves the burdens of purely functional programming and the sophisticated type systems that you talk about. You also mentioned Scala and that one too is extremely pragmatic and lets you mix and match both OOP and functional concepts instead of sticking to purely one paradigm. Erlang is dynamically typed and OCaml does not mark side-effects with types and force you into the monadic context for all such side-effecting computations.

Purely functional programming still remains a purely academic exercise because it fetishizes type systems to the detriment of all other concerns in software engineering. Although I do enjoy some of the things that come out of that kind of work, e.g. parser combinators.

Re: Dijkstra on Haskell and Java (2001)

#20
Although I didn't do CS, but electrical engineering, I would have loved to get some more exposure to functional programming. We got Scheme which everybody hated because of the cumbersome bracket counting.

And of course we got C, Java, Matlab, and VHDL, besides a bunch of assembly. VHDL or Verilog would maybe also a nice eye opener for CS students. It's again another mindset.

Post reply on HN