Live data from Hacker News

Dijkstra on Haskell and Java (2001)

chrisdone.com

211–220 of 253 posts

Re: Dijkstra on Haskell and Java (2001)

#211

Earlier quoted context omitted.

You're moving the goalposts.

No I am saying that college is not about "goalposts". I truly now believe that college is not something that should be done solely to further ones career (hence, passionless students). Instead it is something you do because you are genuinely interested in a subject and want to further education. Otherwise you end up in the situation we are in. If the goal is to have a job, there are better ways of accomplishing that…

"Moving the goalposts" [1] doesn't mean what you think it means.

[1] http://en.wikipedia.org/wiki/Moving_the_goalposts

Re: Dijkstra on Haskell and Java (2001)

#212

I have to say that Java is the absolute worst language for pedagogy. Before people can write "Hello world", they're told they have to write "public static void main(String[] args)", which are presented as magic incantations, "don't worry about those yet". Thus begins the corporate-style coding culture of bashing stuff without understanding it. The stated reason for starting in Java is so that students can get coding…

While I personally agree with teaching something other than Java, there is one big advantage of Java you have overlooked-- as the core language is so simple, bugs caused by incorrect use of the language tend to be "shallow" (bugs caused by algorithmic mistakes can still be very complex of course). An easy example of this is compile-time errors -- the most complex compile time error you can get of Java tends to be not…

A substantial amount of the bad error messages are (were?) mostly from type classes. Helium[1] fixes that problem but not letting you use typeclasses:

http://en.wikipedia.org/wiki/File:HintScreenshot.png

1. http://en.wikipedia.org/wiki/Helium_%28Haskell%29 (still alive?)

Re: Dijkstra on Haskell and Java (2001)

#213
post #208

I can't help but notice that the vast majority of commenters are missing the fundamental reason for all this handwringing. The reason isn't language schism (that too, but I'd attach a much smaller weight to it) so much as the schism between corporatism & academia. Corporate America wants languages that are dumb, easy for corporate drones to assimilate, hard to mess up with, verbose ( verbosity is misinterpreted as do…

Totally! Djikstra was very aware of this influence and pokes only somewhat subtly at it here. Djikstra believed very strongly in inventing the next group of well-armed intelligent computer scientists—scientists tackling the hardest problems humans have yet discovered by his view. His goals are vastly maligned with what corporate America wants and the choice of language is a tool in the war between those interests.

Re: Dijkstra on Haskell and Java (2001)

#214

Earlier quoted context omitted.

Industry is far too low a bar to aim at. College should give them the fundamental understanding of programming that they can apply to a variety of situations. Employability flows out of that.

I truly wish this was a more commonly held view point. You would think, speaking with many, that college was nothing more than a corporate worker mill.

This is a dangerously reductionistic viewpoint that castrates the intellectual potential of students.

To a student versed in Lisp macros, a framework like Rails ceases to be magic and starts being something that can be understood and improved on. Meanwhile, industry shies away from the possibility of a quick dive into a metaprogram, because, (OMG), it's hard!

I'm exaggerating, but industry strikes me as profoundly anti-intellectual at times. We need people to counter this sentiment and the damage it imposes on all of us.

Re: Dijkstra on Haskell and Java (2001)

#215

I would guess Haskell would be perfect if the goal is to produce academics. But if most of your students are destined for industry, Haskell is in my opinion the absolute worst language. - You'll probably get a high drop out rate because of the complexity (recursion, pure / first class functions etc). - You rely that your students already have experience at high school with imperative languages - The industry by far s…

Yes because all of the "practical" and "pragmatic" people know that only academics use Haskell.

Give me a break.

Re: Dijkstra on Haskell and Java (2001)

#216
post #208

I can't help but notice that the vast majority of commenters are missing the fundamental reason for all this handwringing. The reason isn't language schism (that too, but I'd attach a much smaller weight to it) so much as the schism between corporatism & academia. Corporate America wants languages that are dumb, easy for corporate drones to assimilate, hard to mess up with, verbose ( verbosity is misinterpreted as do…

Exactly. Tooling is extremely political. Do you want to use tools with a low skill ceiling? Are you a control freak who worries about the all of the potential catastrophes that unskilled coworkers could rain down on you?

Re: Dijkstra on Haskell and Java (2001)

#217
I love Haskell and Java. From a high level they are my favorite languages for their respective paradigms, so I think most programmers should at least try to write a simple program in both.

That said, I think people are overreacting to Java as a CS 100-level language because of enterprise experiences.

I have written enterprise Java and I hate it, but I still love Java. Java EE is all beans and POJOs and XML and Swing and cruft and I want to burn it in a fire. But that's not Java, those are libraries.

Java is an excellent language to introduce someone to programming, because there is very little magic. Everything is explicit, due to the static typing and imperative nature. The computer (or JVM in this case) doesn't do anything that you don't tell it to do. That's easy for someone to grasp.

Additionally, Java makes it very easy to write readable, organized, and extensible programs even if they are verbose. Using classes, objects, methods, types, and all of that OOP stuff makes it easy to write modular programs where each piece of code does exactly one thing. In functional programming the intricacies of passing state and higher-level functions lead to a lot more spaghetti code for someone who has never programmed before.

Do I think that we should only teach Java? No, of course not. Do I think that it's still a great first language? Absolutely.

If I had control of a curriculum, I'd teach Java for half a semester and then Haskell for half of the semester. I think it's important to not introduce "more productive" dynamic languages like Ruby or Python until students have had to deal with concepts like types so that they can appreciate what Python and other dynamic languages are leaving out.

At Penn, where I go to school, the intro to CS class teaches OCaml in the first half and Java in the second. Unfortunately I think that so many people are struggling with writing code as a concept that they're too frustrated to appreciate the beauty of OCaml at first. Teaching it after something a little easier would make the advantages clearer.

Re: Dijkstra on Haskell and Java (2001)

#218
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 could not be more true. I went to a high school that didn't offer any programming or CS courses, and I didn't even know what coding was until I bought myself a Java book on a whim the summer after my senior year of HS.

At college I started as a Bioengineering major, because I really wanted to make medical devices. I took a CS class in the Spring of my Freshman year and realized that it "clicked" for me and I could go forward with it.

I am now graduating as a Bioengineering and Computer Science dual major and moving to a full time software engineering job at Google next year. I am grateful for the opportunity to learn something entirely new, and I worked my ass off to catch up with the kids who had been coding since they were 12. I don't think that I'm an impostor in the world of CS and I have the additional perspective of not always having known that this is what I want to do.

Re: Dijkstra on Haskell and Java (2001)

#219
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…

I agree. It's nearly impossible to appreciate Haskell as a first language unless you have a strong Math background or you have an exceptional teacher. However once you've done a little programming in another non-functional language the beauty of Haskell is pretty clear.

Re: Dijkstra on Haskell and Java (2001)

#220
post #193

Earlier quoted context omitted.

I have written quite a bit of Haskell, I'm not sure what you think is wrong with my belief. Also, I like C++ :) Both are fairly big complex languages with horrible error messages, horrible compile times (if you use template haskell in particular), with a whole bunch of gotchas you have to learn to get good performance (the haskell gotchas are very different, and often based around lazy evaluation / memory bloat). Bot…

>I have written quite a bit of Haskell That is a very common claim from people posting misconceptions that could only arise from second-hand info and a lack of direct experience. I have a very hard time believing it given that you claim haskell is large and complex. >Also, I like C++ :) I won't hold that against you. >what you think is wrong with my belief Well, everything you just mentioned except the horrible compi…

> That is a very common claim from people posting misconceptions that could only arise from second-hand info and a lack of direct experience.

Do you think that I, and an apparently large number of other people on the internet, spend our time insulting Haskell without having used it? That some great anti-Haskell conspiracy is being waged by evil groups unknown?

I haven't written large enough Haskell programs to have performance problems myself, but I work with people who have. People who have to keep an empty monad around because removing it doubles the run-time of the program, and make substansal changes to get programs into an acceptable (http://www.haskell.org/pipermail/haskell-cafe/2008-August/04...

Post reply on HN