Earlier quoted context omitted.
I've gone through all of those and although it's nice, it is not what I'd call beginner friendly at all. Python has books teaching you to program in Python which is a really good way to learn a programming language. Scott's tutorial using Frankenstein to explain Monads is interesting, but I need to see how to build simple programs and modules first. How does one organize a program using pure FP, or what's the best wa…
i am an expert and Scott's website is usually bananas to me. For some people his approach doesn't seem to click. A good beginner book for F# is a good idea.
Why ML/OCaml are good for writing compilers (1998)
41–50 of 151 posts
Re: Why ML/OCaml are good for writing compilers (1998)
#42For web developers who are looking for an industrial strength functional language instead of JS, OCaml probably has the best story here. Actually it has two OCaml->JS compilers of very high quality The first one, js_of_ocaml, could bootstrap the whole compiler several years ago(probably the first one there). The recent one, https://github.com/bloomberg/bucklescript , push the JS compilation into next level, it genera…
I'm optimistic about Reason, Facebook's new syntax "skin" on top of OCaml. I find OCaml's syntax to be quite gnarly; of the MLs, F# is probably the cleanest and most modern-feeling. Something like F# without the .NET stuff could have been amazing.
Re: Why ML/OCaml are good for writing compilers (1998)
#43After learning Elm I wanted to understand ML/OCaml a bit more, so I worked through some documentation from the OCaml site and walked away pleasantly surprised. After using it for a couple of weeks I am confused why ML/OCaml aren't more popular. They are safe, functional, stable, fast, and have great tooling. They seem poised to take over the functional domain. While the syntax took a little getting used to ( emphasis…
Crappy windows support for OCaml. F# is similar to OCaml, but is very difficult for beginners and those not familiar with .NET. I also don't see a lot of beginner material for OCaml.
Re: Why ML/OCaml are good for writing compilers (1998)
#44The problem with this article is that it's missing an answer to why one would choose ML/OCaml over Haskell. Haskell has many more features, a more advanced type system, arguably superior syntax, and much better library support. However, I believe that OCaml/SML are often a better choice for a number of reasons. First of all, OCaml/SML are the best choice in terms of example code for compilers. They're historically th…
Haskell may indeed be one of the most advanced languages out there in terms of raw power, but it is very complex (how many monad tutorials does it seriously take to teach one of the most core pieces of the language) and how much category theory do you need to know to be moderately effective? Also, the ecosystem could use some work. An example is the main string library isn't used in favor of a different one. Using th…
I believe the answer to both questions is zero. Unfortunately there is pedagogical cruft in the community that makes it appear this way. main :: IO () is comparable to public static void main(args[]) or whatever nonsense in Java.
Re: Why ML/OCaml are good for writing compilers (1998)
#45For anyone interested and isn't aware yet Facebook is developing Reason, a layer over OCaml. I've been fiddling with it for the past couple of weeks and coming from JavaScript I personally found the experience generally enjoyable. https://facebook.github.io/reason/
Javascript | Reason
--------------+----------------------------
const x = y; | let x = y;
let x = y; | reference cells
var x = y; | No equivalent (thankfully)Re: Why ML/OCaml are good for writing compilers (1998)
#46Re: Why ML/OCaml are good for writing compilers (1998)
#47After learning Elm I wanted to understand ML/OCaml a bit more, so I worked through some documentation from the OCaml site and walked away pleasantly surprised. After using it for a couple of weeks I am confused why ML/OCaml aren't more popular. They are safe, functional, stable, fast, and have great tooling. They seem poised to take over the functional domain. While the syntax took a little getting used to ( emphasis…
>After using it for a couple of weeks I am confused why ML/OCaml aren't more popular For me, the issue is the GIL, although that is being worked on as we speak.
Re: Why ML/OCaml are good for writing compilers (1998)
#48Earlier quoted context omitted.
I think MLs are kind of in limbo in regards to functional vs. imperative and OO vs. procedural programming. While they offer good OO, it's utilized very little. The functional features are used a ton, but don't dare approach the complexity of Scala, Haskell, etc., which is disappointing to a lot of more advanced functional programmers. They have reasonably good facilities for imperative programming, but these are mos…
I would actually argue the opposite: ML languages propose the sweet spot of having functional features but still being flexible. Mutability, OO and various other feature are all there just when you need them. You don't need, like in Haskell, to do incredible contortions to be able to express things naturally. Regardless which algorithm and API you want, there is a pretty good chance you can express it in OCaml natura…
Sounds like you're in the same boat as the asker.
Re: Why ML/OCaml are good for writing compilers (1998)
#49Earlier quoted context omitted.
I would actually argue the opposite: ML languages propose the sweet spot of having functional features but still being flexible. Mutability, OO and various other feature are all there just when you need them. You don't need, like in Haskell, to do incredible contortions to be able to express things naturally. Regardless which algorithm and API you want, there is a pretty good chance you can express it in OCaml natura…
So, what's your answer to the question being asked, "why ML/OCaml aren't more popular" ? Sounds like you're in the same boat as the asker.
Re: Why ML/OCaml are good for writing compilers (1998)
#50You can't use the coding style used for recursive descent in the Dragon compiler book, without using mutable variables.
Do you have to use parser combinators, which have their own limitations?