Frequently Asked Questions
A collection of information that did not seem to fit in anywhere else.
We recommend reading the Programming Flix book.
If you get stuck or need help feel free to reach out to us on Zulip.
repl command.No, Flix is a full-blown general-purpose programming language.
Flix borrows a lot of syntax from Scala, hence the two languages have a similar feel.
We think Scala made many good design choices with respect to syntax, including:
- the use of short keywords,
- the
x : Tsyntax for type annotations, - the
List[Int32]syntax for type parameters, and if,match, etc. as expressions.
However, other than syntax, the two languages are very different:
- Scala is object-oriented, Flix is not.
- Scala has sub-typing, Flix does not.
- Flix has an effect system, Scala does not.
- And so on.
Flix runs on the JVM which means that the performance of Flix programs is comparable to that of Java and Scala programs.
Flix is a whole-program optimizing compiler that uses monomorphization and inlining (like Rust and MLton). Hence, sometimes, Flix programs run faster than their Java or Scala equivalent.
The following design choices may be considered controversial by some:
- Unused variables are compile-time errors.
- Shadowed variables are compile-time errors.
- Unused definitions, type declarations, etc. are compile-time errors.
- No variadic or labelled function arguments.
- No warnings, only compile-time errors.
- Dividing by zero yields zero.
curl.The latest compiler version and the website are not always in sync, hence occasionally some examples may stop working.
Occasionally a mischievous visitor will crash the online editor (or rather the virtual machine on which the compiler runs).
Yes, no programming language developed outside of those four corporations has ever been successful. See also C, C++, Java, Python, PHP, MATLAB, Perl, R, Ruby, Scala, ...
That said, if you work for a company and would like to help sponsor Flix, please feel free to reach out to us :)
Yes, we do it all for C#.
Yes, we take inspiration from programming languages that are pushing on the boundary of language design.
What would be the point of taking ideas from C, Perl, PHP, and Visual Basic?
Also, who said that we are taking their most complex ideas? Rather we should take their best ideas.
Do we really need safer airplanes?Do we really need electric cars?Do we really need more ergonomic chairs?
I mean, after all, we already have airplanes, cars, and chairs!
We build new programming languages and we conduct research on programming language design because we want to offer developers better tools to write programs. We want to make it simpler, safer, and faster to write correct programs.
And we want to increase developer happiness. It should be a pleasure to use Flix!
We much prefer Cholula Hot Sauce.
That said, forM is clear, concise, and works well with forA allowing one to easily switch between monadic-code and applicative-code.
The Flix syntax is based on keywords except when there is aclearly established historical precedent for using a symbol. For example:
- The cons of an element
xand a listxsis written asx :: xs. - The underscore
_denotes a wildcard (or an unused variable). - The symbol
:-denotes logical implication in Datalog rules.
