1. 43
    1. 4

      Genuine curiosity: for folks wanting multicore OCaml, why not use F# from current dotnet 6.x since it works everywhere, and can compile to native, I believe, too.

      1. 11

        A few reasons off the top of my head:

        • OCaml has fast compile from scratch and near-instant incremental compilation
        • Compiles to actual native binary as opposed to a full bundle of .NET runtime in a thin wrapper executable
        • OCaml’s Multicore approach is similar to Java’s Project Loom virtual threads approach, i.e. no need for async/await, just program in direct style and I/O is automatically nonblocking.
        1. 2

          Thank you!

      2. 10

        The most common answer to “why use X when you could use Y” is “we already have a bunch of X and rewriting it all in Y is a non-starter”

      3. 5

        does ‘everywhere’ include NetBSD, OpenBSD?
        F# GUI binding on non-Windows platforms, is there a good framework to pick up?

        I think access to .NET ecosystem is a big plus for F#, but it is not clear that syntax constructs between the 2 languages map one-to-one. I cannot find links right now, but as a casual reader it seems that Ocaml is more advanced.

        1. 7

          They absolutely don’t map. There’s a common subset, but that’s about it. F# lacks a module system comparable to ML (functors etc.), and its OO is the .Net OO, not OCaml’s object system with structural typing and object type inference.

          1. 4

            Plus the programming model offered by domains+effects is nothing like async F#.

        2. 1

          I wonder if F# will evolve towards parity

    2. 3

      For those who use OCaml, what is your application domain?

      1. 5

        I wouldn’t call myself one that uses OCaml, but I used Lambda Soup recently to do some markup parsing/rewriting and it was a lot nicer than doing the same in Python and Beautiful Soup. Would recommend.

      2. 4

        It’s a general-purpose language so anywhere really. You can use it in the same domains as Python, Haskell, Go, Java, JavaScript, PHP, and many such languages.

        1. 3

          I know, I have used OCaml and other languages from the ML family extensively.

          However, libraries pretty much dictate what you use a language for, in practice.

          1. 3

            There is a respectable number of libraries covering most domains. Although it’s hard to tell what different people consider essential. One person can’t use it unless it has Google Cloud bindings. Another can’t use it without Qt bindings. These are all in various states of completion because they’re not officially maintained by anyone, they’re just side projects.

      3. 4

        so far i’ve mostly been using it as a hobby language for word game related programs (crosswords, anagram generator), but it’s a pleasant general purpose language. only thing i’ve really missed is a good ORM.

      4. 3

        Formal verification, logic, automated reasoning. Admittedly a lot of that was during my time in academia but it shines at it.