Skip to content

Comment on Hakaru: An embedded probabilistic programming language in Haskellparent

Comments

Out of curiosity, which part of the example did you find difficult?

Haskell bears very little resemblance to traditional pseudo-code, compared to something like JavaScript.

True. Traditional pseudo-code tends to be imperative.

I think you'll face a similar problem with Clojure :)

Since the example used Monads, it was rather imperative.

Monads aren't really imperative, though the syntax sugar sometimes looks like it, but in any case that's too fine a point. You know what I meant. Pseudocode usually looks like this:

  x := 1
  while (x < 100)
    stuff(x)
    x := x + 1
etc, etc. Typical Haskell doesn't look like this. The example didn't look like this. Clojure won't look like this, either (in fact, it's likely to look even weirder than the Haskell example). That's neither good nor bad; I don't think programming languages should be judged by how much they resemble C/Pascal/Python/pseudocode.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.