Choosing the new Stan compiler's implementation language


Probably. I just want to make sure we’re doing the right thing.

Sure, anything consistent with the BSD. That means keeping the original license. What you can’t do is download A, then redistribute it under a different license, such as GPL.

Right. As long as A keeps its BSD license.

My only concern is what we should put at the top level to describe A. Should we just say that A is GPL-ed or should we say A is GPL-ed but it relies on components under other licenses compatible with GPL. Exactly what @increasechief points out here:

I had to look up the “L” there—it’s just “free” in another language (“libre”). Seems redundant to me.

We can’t quite do this because our logos aren’t consistent with CC BY, but this is pretty much what we say now.


Folks, can we move the discussion of an all-in-one installer outside of the compiler implementation language thread? I feel like it is getting off track very fast.


I think we can close this discussion altogether as we’ve decided to go with OCaml.


No worries. No discussion’s ever truly closed with open-source software.


An implementation already exists in Haskell:

This was presented at StanCon 2018:

If you are thinking of OCaml, why not Haskell?


If you search the thread for Haskell you might get background information on why Haskell was not picked.


There was some information but I couldn’t find a summary or the rationale for the final choice just a bald statement. But the choice seems to have been made.

  1. That is not an even half-complete implementation of a Stan parser (which is also less than half of a complete compiler). See how it only has ints and reals, hardcodes all functions, doesn’t represent statements at all, etc? Check out this Stan AST in OCaml to see what a more complete version should contain.
  2. The search “feature” on discourse is absolutely awful, my biggest gripe with it. Here are some posts where it is discussed in a lot of detail:
    Choosing the new Stan compiler’s implementation language
    Choosing the new Stan compiler’s implementation language
  3. In another post, I made a request for someone who knows both OCaml and Haskell to attempt to compare the two languages using the desiderata in the original post, but no one was able to and the general consensus seemed to be that OCaml is basically almost as good, even to a Haskell person.


Thanks for replying. And sorry to be a Jonny-come-lately to the discussion when I now see there has been a lot of discussion. It’s a shame I didn’t see your request for the comparison. I am wearing an OCAML t-shirt as I write this :-) I don’t think it’s worth writing anything now the choice has been made.