Software Alternatives & Reviews

MLton VS OCaml

Compare MLton VS OCaml and see what are their differences

MLton logo MLton

MLton is an open-source, whole-program, optimizing Standard ML compiler

OCaml logo OCaml

(* Binary tree with leaves carrying an integer.
  • MLton Landing page
    Landing page //
    2021-12-25
  • OCaml Landing page
    Landing page //
    2023-10-03

We recommend LibHunt OCaml for discovery and comparisons of trending OCaml projects.

MLton videos

No MLton videos yet. You could help us improve this page by suggesting one.

+ Add video

OCaml videos

Uncommon Languages: OCaml

More videos:

  • Review - What is Ocaml?
  • Review - OCaml – The Best Coding Language for Blockchain – Dr. Dray at Tezos LA

Category Popularity

0-100% (relative to MLton and OCaml)
Programming Language
18 18%
82% 82
OOP
22 22%
78% 78
Generic Programming Language
IDE
100 100%
0% 0

User comments

Share your experience with using MLton and OCaml. For example, how are they different and which one is better?
Log in or Post with

Social recommendations and mentions

Based on our record, OCaml should be more popular than MLton. It has been mentiond 30 times since March 2021. We are tracking product recommendations and mentions on various public social media platforms and blogs. They can help you identify which product is more popular and what people think of it.

MLton mentions (5)

  • Simple JSON parser in c++, rust, ocaml, standard ml
    Once I got the parser ready in OCaml, I thought I port it to Standard ML, since it belong to the same ML language family. I was also curious on how well mlton could optimise it. The language lacks custom let bindings, so I resorted to use Result.bind manually. This makes code much less readable and more verbose. The standard library also lacks result type, so I had to come up with my own simple implementation.... - Source: dev.to / about 1 year ago
  • Ante: A low-level functional language
    If you’re fine with tracing GC (which depends on the situation, of course), Standard ML is a perfectly boring language (that IIUC predated and inspired Caml) and MLton[1] is a very nice optimizing compiler for it. The language is awkward at times (in particular, the separate sublanguage of modules can be downright unwieldy), and the library has some of the usual blind spots such as nonexistent Unicode support... - Source: Hacker News / almost 2 years ago
  • Write your own programming language in an hour with Chumsky
    Unfortunately, I haven't found a ton of "easily-digestible" and, at the same time, comprehensive guides on compiling functional languages. Generally you'll find a mix of blog posts/class notes/papers covering a single step. Some resources I like: - Andrew Kennedy's 2007 paper Compiling with Continuations, Continued [1]. This one is the most clear IMO - Andrew Appel's Compiling with Continuations book... - Source: Hacker News / about 2 years ago
  • Why are imperative programs considered faster than their functional counterparts?
    More broadly, they can be fast even without such extensions if they aggressively pursue optimization opportunities afforded by static typing, like MLton for example, but that also impacts compilation performance negatively. Source: over 2 years ago
  • Coalton: How to Have Our (Typed) Cake and (Safely) Eat It Too, in Common Lisp
    According to the OP, it's from http://mlton.org/ (see https://coalton-lang.github.io/20211010-introducing-coalton/#acknowledgements ). - Source: Hacker News / over 2 years ago

OCaml mentions (30)

  • Bringing more sweetness to ruby with sorbet types 🍦
    If you have been in the Ruby community for the past couple of years, it's possible that you're not a super fan of types or that this concept never passed through your mind, and that's totally cool. I myself love the dynamic and meta-programming nature of Ruby, and honestly, by the time of this article's writing, we aren't on the level of OCaml for type checking and inference, but still, there are a couple of nice... - Source: dev.to / 8 months ago
  • Notes about the ongoing Perl logo discussion
    An amazing example is Ocaml lang logo / mascot. It might be useful to talk with them to know what was the process behind this work. The About page camel head on Perl dot org header is also a pretty good example of simplification, but it's not a logo, just a friendly illustration, as the O'Reilly camel is. Another notable logo for this animal is the well known tobacco industry company, but don't get me started on... - Source: dev.to / 10 months ago
  • What can Category Theory do?
    Haskell and Agda are probably the most obvious examples. Ocaml too, but it is much older, so its type system is not as categorical. There is also Idris, which is not as well-known but is very cool. Source: 11 months ago
  • Key takeways from OpenAI CEO's 3-hour Senate testimony, where he called for AI models to be licensed by US govt. Full breakdown inside.
    NEAT is a fascinating algorithm. I've been interested in it ever since SethBling made a video about it playing Mario and this series of experiments about a variant of NEAT that evolves in real-time rather than by-generation. I'm finally getting to be just good enough of a programmer that I am actually considering writing my own (probably in OCaml because there's an unfortunate lack of NEAT implementations in... Source: 12 months ago
  • So Hows the Hackathon Going?
    Easier than haskell and easier for writing compilers: https://ocaml.org/. Source: 12 months ago
View more

What are some alternatives?

When comparing MLton and OCaml, you can also consider the following products

SML/NJ - Standard ML of New Jersey: compiler and runtime environment with REPL

Rust - A safe, concurrent, practical language

Poly/ML - The Poly/ML implementation of Standard ML – full multiprocessor support in the thread library and garbage collector, interactive debugger, fast compiler.

Elixir - Dynamic, functional language designed for building scalable and maintainable applications

Chicken - A portable and efficient cross-platform Scheme implementation that compiles to C.

Go.CD - Open source continuous delivery tool allows for advanced workflow modeling and dependencies management.