Live data from Hacker News

Dijkstra on Haskell and Java (2001)

chrisdone.com

141–150 of 253 posts

Re: Dijkstra on Haskell and Java (2001)

#141
post #118
post #88

Earlier quoted context omitted.

As Brian Beckman explained, as an aside, in "Don't fear the Monad" [1], these two differing views were born in the '70s and split two programmers into two camps: The bottom-up people, and the top-down people: - The bottom-up people start with the hardware and only add abstractions and trade performance where necessary (fortran, c, java) - The top-down people started with perfect abstraction/logic and reduced/removed…

> The bottom-up people [...] only add abstractions [later] I don't think bottom-up verses top-down are like political camps. I think it's more innate, like right-brained vs. left-brained. I can't understand abstractions till I first understand the lower level. I could never learn algebra without first learning arithmetic. (BTW, I'm old enough to have lived through the New Math philosophy which insisted that every gra…

I don't think anyone understands abstractions right away. Most people learn through examples, and have to recreate the abstractions themselves, even if the abstraction is explained as well as possible.

I think the main difference is purely in which abtraction people prefer to think in (imperative, OOP, functional, etc) but everyone wants to turn it into something else because to them, their model "feels" more right.

Re: Dijkstra on Haskell and Java (2001)

#142
post #118
post #88

Earlier quoted context omitted.

As Brian Beckman explained, as an aside, in "Don't fear the Monad" [1], these two differing views were born in the '70s and split two programmers into two camps: The bottom-up people, and the top-down people: - The bottom-up people start with the hardware and only add abstractions and trade performance where necessary (fortran, c, java) - The top-down people started with perfect abstraction/logic and reduced/removed…

> The bottom-up people [...] only add abstractions [later] I don't think bottom-up verses top-down are like political camps. I think it's more innate, like right-brained vs. left-brained. I can't understand abstractions till I first understand the lower level. I could never learn algebra without first learning arithmetic. (BTW, I'm old enough to have lived through the New Math philosophy which insisted that every gra…

Good points, didn't know about New Math, but the failure is very insightful. I'm not sure if perhaps there should be a distinction between operational abstractions vs logical abstractions.

Scripting seems sit in a strange middle ground. Scripting languages tend to be very high level, but are often very approachable for beginners, e.g. Logo

Re: Dijkstra on Haskell and Java (2001)

#143
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 think that this assumption might leave behind students that have not yet been exposed to any programming (that stuck). Let me provide some anecdotal counter-evidence: during my last year of high school, I was in a university class where they taught us programming using Haskell (this was in 2000). I observed a fairly consistent pattern - those who had prior experience with imperative programming (me included), had f…

A hypothesis is that it might be harder because you are learning a bit more: you not only have to learn the new way, but also internally how it relates to the old way.

Re: Dijkstra on Haskell and Java (2001)

#144

Earlier quoted context omitted.

It's just a business thing. Some large local companies come and talk to the university and say that they need a bunch of CS grads to fit into their business. The HR drone says they need to know Java to be able to integrate into the company quickly. The lecturers get upset. The finance department gets promised a donation, the marketing department gets promised easy job searching for CS students. The ivory tower crumbl…

That might (might) explain a tiny college, but it's not a reasonable explanation for universities with huge endowments to switch from Haskell to Java.

Yet they swapped - which is either explained by some love for java (unlikely) or that "more money is more good" even with a huge endowment.

Re: Dijkstra on Haskell and Java (2001)

#145
post #10

Earlier quoted context omitted.

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…

> the most complex compile time error you can get of Java tends to be nothing more than "mismatched bracket" or "incorrect function call" … following with the NullPointerException in runtime

You generally don't get these if you use @Nullable etc

Re: Dijkstra on Haskell and Java (2001)

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

>> University is a not a "school" you attend for learning a subject.

Except for the Keynes thing, the stuff you're talking about is included in classes that every 12-year-old has to take. The analog would be using a computer rather than programming a computer.

Re: Dijkstra on Haskell and Java (2001)

#147
post #124
post #103

I tend to think Java is a good first programming language, much like Basic and Pascal were the "first programming language" for so many of us back in our youths. Not every high-school offers programming, and of the ones that do there's no guarantee students have actually been properly introduced to programming. And like all "first programming language"s, it should be discarded as you learn proper languages. 2001ish-e…

What are Java's merits as a first programming language? Keep in mind all of its warts would have to be unlearned later by the prospective student. It can, like Dijkstra argued, introduce unhealthy thinking habits. Why not a simpler higher-level language as a first language? (pick one, there are lots of simpler languages than Java).

Most of the good "simple high-level languages" are dynamically typed... which is also worth considering - Python would be a fine "first language" too if you were okay with putting off the concepts of static typing into a later course.

But if you wanted to include static typing and were trapped in 2001? I'd be hard-pressed to come up with a better language than Java, at least without getting into some pretty obscure platforms.

Re: Dijkstra on Haskell and Java (2001)

#148
I'm a wee bit confused by this. I graduated from UTCS in 1990 (the first time) and was a graduate student and employee of the CS department from about 1992 until 2004-ish.

At no time were the introductory classes in Haskell, to my knowledge.

According to the wayback machine[1], the introductory courses (CS307 at the time) in 2001 were in Scheme, while subsequent courses were in C++. I recall the introductory classes experimented with Miranda briefly.

On the other hand, the typed letter[2] is from the EWD archives. Weird.

[1] https://web.archive.org/web/20010429024151/http://www.cs.ute...

[2] http://www.cs.utexas.edu/users/EWD/OtherDocs/To%20the%20Budg...

Re: Dijkstra on Haskell and Java (2001)

#149
post #85
post #44

Earlier quoted context omitted.

>Personally, I see Haskell as the C++ of functional language You should try it some day, it is absolutely nothing like your misconceptions.

Haskell is a relatively difficult language to try. Introductions and books almost seem to expect you to understand the syntax when you begin. And I/O is introduced late, which makes it hard to play around with.

Learn You a Haskell is an excellent introductory text and I see no way in which it "expect[s] you to understand the syntax when you begin." It walks you through things very explicitly. Yes, IO is introduced late, but it is not necessary for playing around with the language. IO is only necessary for play in languages that don't have a REPL.

Re: Dijkstra on Haskell and Java (2001)

#150

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…

> An easy example of this is compile-time errors -- the most complex compile time error you can get of Java tends to be nothing more than "mismatched bracket" or "incorrect function call"

So, you're saying it's a benefit that the Java compiler doesn't help you out with anything very meaningful? The "complex error messages" are one of the most significant benefits of using Haskell, for me, because it means that the compiler it helping me out with more than just trivial syntax matters.

Post reply on HN