212 karma · joined December 20, 2018
(I am one of the developers of Flix).
But I agree, this can be cumbersome. So, Flix allows any unused construct to be prefixed with an underscore to mark it as unused. (But underscored things cannot be referenced.) This seems like a pragmatic trade-off.
(I am one of the developers of Flix).
(I am one of the developers of Flix)
- We are trying to make the entire compiler resilient (error-tolerant), incremental, and parallel. We have managed to make every single compiler phase (of which there are 28) parallel. This has already led to significant speed-ups. We are now trying to increase the degree of parallelism within each phase. We are also working on error resilience to provide LSP support no matter what errors a program contains (syntax, naming, type). For example, it should be possible to rename a variable even if the program currently has multiple errors.
- We are adding support for algebraic effects and handlers. This will allow users to define and handle their own effects.
- We are also exploring a novel way to combine type classes ("traits") and effects.
- We have recently added support for package management and integration with Maven.
In summary, we are already in a great spot, and useful programs can be written in Flix today. I encourage you to check out the documentation: https://doc.flix.dev/ and to try Flix!
(I am one of the developers of Flix).
https://doc.flix.dev/fixpoints.html
(I am one of the developers of Flix)
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.
> 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)
- We are debating whether to allow a limited form of overlapping instances. No decision has been made yet.
- Flix uses the Options and Errors. Flix also has monadic let* making it easier to work with these two types.
- UFCS had to be removed because it caused unavoidable ambiguities with records :(
- I am not sure I understand the question about instance resolution. Feel free to stop by our Gitter channel to discuss further.
(I am one of the authors of Flix.)
def swap!(a: Array[a, r], i: Int32, j: Int32): Unit \ { Read(r), Write(r) }
We are aware of algebraic effects and handlers, but let's just say that we prefer to underpromise and overdeliver.(I am one of the authors of Flix.)
(I am one of the authors of Flix.)
EDIT: I hope to explore a macro system for Flix in the future. So we are definitely on the same side of the issue; just wanted to point out that the current system is more powerful.
- Division must be impure (because it can throw an exception, crash the program, etc.)
- Division must be partial - i.e. return Option[Int].
Both seem worse compared to defining division by zero as zero. Coq, Lean, and Pony do the same. https://github.com/ponylang/pony-tutorial/blob/master/conten...
It seems that the situation is not as clear cut as your post suggests.
(I am one of the authors of Flix)
(I am one of the authors of Flix)
The effect system in Flix is focused on a single effect: purity. It is very fine-grained (compared to e.g. systems based on rows) and it supports effect inference and effect polymorphism. Eff and Unison have richer effect systems - based on algebraic effects - which allow re-interpretation of effects. However these effects system struggle more with effect inference. For example, I believe that in Eff you only have a restricted form of effect polymorphism / the use of higher-order functions is more limited.
(I am one of the authors of Flix)
let x = 123; let y = (x, x)
If you substitute x into the pair you get the same result. So far, so good.
Now consider:
let x = [1, 2, 3]; x[0] = 5; let y = x[0]
If you substitute x into the body of y you get a different result! The meaning of x[0] changed underneath you. We are very conservative and say that anything which touches an array is impure. Is this the best solution? no- but it is a reasonable/sound start.
(I am one of the authors of Flix).
(I am one of the authors of Flix).
> Can we just stop building new programming languages?
We build new programming languages and we do research on programming languages because we want to offer developers better tools to write programs. We want tools that make it simpler, safer, and faster to write correct programs. We want tools that increase productivity and that aid in program maintenance.
The situation is not unlike why we would want better airplanes, better houses, or better surgical instruments.
(I am one of the authors of Flix)
(I am one of the authors of Flix)
Flix aims to occupy a unique point in the design space. It combines features from programming languages like Go, Haskell, OCaml, and Scala in a way that no other language does. It has:
- a sound type system (like Haskell and OCaml)
- a complete local type inference algorithm (like Haskell and OCaml)
- eager evaluation (like OCaml and Scala)
- CSP style concurrency (like Go)
- type classes (like Haskell)
- full tail call elimination (like OCaml and Haskell)
If you look at the "Innovations" page you will find that Flix has (at least) two features found in no other programming language: a polymorphic type and effect system and first-class Datalog constraints.
(I am one of the authors of Flix).