Flix (programming language)

This is an old revision of this page, as edited by JorKadeen (talk | contribs) at 19:19, 28 August 2020. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Flix is a functional, imperative, and logic programming language developed at Aarhus University with funding from the Independent Research Fund Denmark[2] and by a community of open source contributors. Flix supports algebraic data types, pattern matching, parametric polymorphism, currying, higher-order functions, extensible records, channel and process-based concurrency, and tail call elimination.

Flix
ParadigmMulti-paradigm: functional, imperative, logic
DeveloperAarhus University, open-source contributors
First appeared10 August 2015; 10 years ago (2015-08-10)
Typing disciplineinferred, static, strong
PlatformJVM
LicenseApache License 2.0[1]
Filename extensions.flix
Websiteflix.dev
Influenced by
F#, Go, Haskell, OCaml, Scala

Flix supports Datalog constraints as first-class values that can be passed around, compose with other constraints, and solved.

The Flix type and effect system supports [[Hindley–Milner_type_system||Hindley-Milner]-style type inference. The system separates pure and impure code. If an expression is typed as pure then it cannot produce an effect. Higher-order functions can enforce that they are given pure function arguments or alternatively they can be effect polymorphic in the effect of their arguments. The effect inference algorithm is based on Boolean unification.

History

Examples

Hello World

print_endline "Hello World!"

Algebraic Data Types and Pattern Matching

...

Higher-Order Functions

...

Extensible Records

...

Notable Features

Polymorphic Effects

First-class Datalog Constraints

Principles

The Flix language design includes a collection of stated principles that shape the language[3]. These include:

  • Everything is an expression

References

  1. ^ "Apache License 2.0" – via GitHub.
  2. ^ "Forskningsprojekter". Danmarks Frie Forskningsfond (in Danish).
  3. ^ "The Flix Programming Language". flix.dev. Retrieved 28 August 2020. {{cite web}}: Text "Principles" ignored (help)

Category:Functional languages