Live data from Hacker News

Dijkstra on Haskell and Java (2001)

chrisdone.com

91–100 of 124 posts

Re: Dijkstra on Haskell and Java (2001)

#91
post #70
post #53

Earlier quoted context omitted.

How about F#'s Computation Expressions? Not exactly the same, I'm told, but they're close, if so.

They're called computation expressions in F# and not monads because they're not exclusively used to implement monads. The term is more generalised to capture the much larger scope of the feature. Here's a breakdown of the difference: http://tomasp.net/blog/2013/computation-zoo-padl/index.html

Excellent! Thank you!

Re: Dijkstra on Haskell and Java (2001)

#92
post #39

FWIW, UC Berkeley's intro CS course sequence goes through the following languages in order: [Scratch (in an optional gentle-intro CS course)], Python (with an emphasis on using it for functional programming), a tiny bit of Scheme, a tiny bit of SQL (before they used a toy logic programming language), Java, C, MIPS assembly. I think this walks down the ladder of abstraction very nicely.

Odd to use Python as your intro to functional programming, since it lacks many functional programming features besides lambdas which the language creator doesn't even like ( http://www.artima.com/weblogs/viewpost.jsp?thread=98196 )

Lambdas (in Python) are just syntax; it's usually better to achieve concise Python code using list comprehensions. The critical feature for functional programming is first-class (and higher-order) functions, which are supported and encouraged in Python. I think Python is better for an introductory functional programming course than C#, Java, C++ et al, which also support "functional programming features" but only in the context of a fairly rigid OO system. What do you think is missing from Python?

Re: Dijkstra on Haskell and Java (2001)

#93
post #27

I've never formally studied CS, but I can definitely see the benefit. I can divide my own (amateur) programming experience into pre-Haskell and post-Haskell. Before I started learning Haskell, I thought I knew how to use a good half a dozen or more programming languages. After I started learning Haskell, I realised I'd really only known how to use one all along, and that they were all fundamentally the same. I wish I…

If you liked the "I'd really only known how to use one" type of experience, then I encourage you to keep learning languages after you are happy with where you are with Haskell. My experience is that languages stop feeling like cohesive entities and start feeling like a collection of features.

The nontraditional categories I've encountered are something like:

The macro facilities in lisp, scheme, forth (or factor), template haskell, and C++ templates.

Array languages like APL, K, or R.

Prototype inheritance with smalltalk or Lua.

Avoiding side effects with Haskell, Ocaml, or C#'s linq.

The "we're serious about type theory" languages like Haskell, coq, agda, and idris.

Re: Dijkstra on Haskell and Java (2001)

#94
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 never got the whole hype behind OOP.

It's really not much to it. Get value records right. Get method records right. Sadly, none of C, x86 or Haskell does this.

Re: Dijkstra on Haskell and Java (2001)

#95

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.

Think about how that would have changed if they had a simple text editor with parenthesis highlighting.

Re: Dijkstra on Haskell and Java (2001)

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

Add a Lisp or Scheme dialect to your list and I'm sold. Homoiconicity, macros, s-expressions and such are too powerful and novel not to cover in a college CS curriculum.

Re: Dijkstra on Haskell and Java (2001)

#97

FWIW, UC Berkeley's intro CS course sequence goes through the following languages in order: [Scratch (in an optional gentle-intro CS course)], Python (with an emphasis on using it for functional programming), a tiny bit of Scheme, a tiny bit of SQL (before they used a toy logic programming language), Java, C, MIPS assembly. I think this walks down the ladder of abstraction very nicely.

I'm actually somewhat sad that they added the two in front of Scheme. I took an intro to CS course there the summer before heading to college and it was taught in Scheme. The teacher literally taught us the language the first day and then, from there on out, it was learning different techniques through mostly computer labs. Prior to that, my only programming experience had been in TI-Basic, so it was an eye-opening experience to realize that programming was more than just an ordered set of instructions. If I hadn't had that experience, I think I might have learned the wrong lesson when my college CS courses dumped C on me.

I'm not sure about Haskell as a beginner's language, but I consider Scheme to be almost ideal for that purpose since it's so easily digestible.

Re: Dijkstra on Haskell and Java (2001)

#98

While I wouldn't start with Java (it's not the simplest language about - I'd probably use C or Python) Dijkstra's anti-Java rant is over the top. It's still a huge language and that's NOT because of any corporate advertising campaign. Something that succeeds as well as Java has to have some actual value.

"Something that succeeds as well as Java has to have some actual value"

Sounds an awful lot like, the Bandwagon fallacy

Re: Dijkstra on Haskell and Java (2001)

#99
post #75
post #56

Earlier quoted context omitted.

I have a problem with modern notions of purely functional. My first functional programming language was Caml Light, back in 1996. Followed by Prolog and eventually Lisp. All alongside traditional lambda calculus and logic proofs, with ocasional references to a programming language called Mirada. So for me, Lisp is functional programming and I don't buy into this modern notion that only Haskell is the poster child of…

I looks like alayne is using 'purely functional' to mean Pure + Functional, but you are using it to mean Everything is an Expression / First-class functions, etc.. The functional paradigm. Lisp is definitely a functional language. It's just not as pure as Haskell, which is the poster child for Maximally Pure FP, if not for the functional style.

Hence why I made the reference to Miranda.

We were already doing functional programming while Haskell was still using diapers.

Re: Dijkstra on Haskell and Java (2001)

#100
post #32

Earlier quoted context omitted.

You mean like Crash Bandicoot, Abuse, Jak and Daxter? Or maybe Genera. Or maybe Remote Agent software used by Nasa Deep Space 1? Or eventually the train control systems running on software from Siscog?

Probably more like when Mozilla ships a browser written in Rust. Even though Rust handles low-level so well, it heavily uses FP concepts. Meanwhile, this is good news for people creating startups or otherwise being competitive. Having advanced programming languages where your competition is mired down having to churn out 10x more code, is certainly a benefit. Although not every (many?) business really comes down to t…

> Probably more like when Mozilla ships a browser written in Rust.

Actually I would rather see this happening, than the continuous effort on Firefox OS.

Post reply on HN