Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

An alternative to OCaml is Flix (https://flix.dev/) which attempts to address some of the critiques in the post. For example:

> Bad standard library

A particular goal of Flix is to have a consistent standard library based on type classes.

> Standard types are sometimes persistent, sometimes mutable. List, Map, and Set are persistent. Stack and Hashtbl are mutable.

In Flix immutable types are named List, Set, Map, etc. and mutable collections are prefixed with Mut, e.g. MutSet, MutMap, etc. Mutable data types also carry a region.

> Also, OCaml has no tracking of side-effects (like in Haskell)

Flix has an effect system that tracks purity/impurity.

(I am one of the developers of Flix)



Complete Feature List

    algebraic data types
    pattern matching
    first-class functions
    extensible records
    parametric polymorphism
    type classes
    higher-kinded types
    light-weight polymorphic effects
    type aliases
    Hindley-Milner type inference
    CSP-style concurrency
    buffered & unbuffered channels
    first-class datalog constraints
    polymorphic datalog predicates
    constraints with lattice semantics
    stratified negation
    interoperability with Java
    unboxed primitives
    keyword-based syntax
    redundancy checks
    monadic let\* expressions
    expressions holes
    compilation to JVM bytecode
    full tail call elimination
    core standard library
    parallel compiler architecture
    human friendly errors
    interactive mode
    Visual Studio Code support
Nice!


I know some of those words.


It pains me every time I find a great programming language and then find out that it runs on the JVM.


I have been keeping an eye on Flix. Thanks to you and rest of the Flix team for working on a bold but practical language. I wish you success. I think Flix is one of the most promising languages in the ML family. (Do you consider it an ML?) I love that it has embedded Datalog.

I know it is pre-1.0, but I would still like to ask about adoption. Are there notable third-party open source projects in Flix yet? By "third-party" I mean created outside of Aarhus University and the University of Waterloo.


Thanks for the kind words.

Yes, I would definitely consider it a language in the ML-family. Its core is based on Hindley-Milner (like StandardML, OCaml, and Haskell) which I think is the hallmark of ML-family languages. Flix sits neatly between Ocaml and Haskell in that it allows side-effects (like Ocaml, unlike Haskell) but they are tracked by the effect system. Hence one can program in the spectrum between those two languages, but get strong guarantees from the compiler.

In terms of adoption, we see a lot of people trying it out, and there are some packages out there already, but nothing too big yet. We recently added support for package management, so hopefully that will help the community grow.


Nice to hear about the package management.

Sorry, I wasn't clear. I meant to ask whether you considered Flix "an ML" as opposed to just being in the ML family. It's an ontological question, and not important, so don't sweat the answer. I am just curious how Flix developers see their project.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: