Skip to content

Functional Programming

Andrew Johnson edited this page Oct 2, 2024 · 12 revisions

Functional Programming is supported within the compiler internals based on the semantics of System F<: with Specialization. When using functional programming in applied contexts it often becomes necessary to use a variety of data structures that may have runtime costs.

Closures

Implementation of closures is currently waiting for representation selection for closures. Garbage Collection is also sort of necessary for closures to work properly.

Evaluation Order

LM is not explicitly eager or lazy, it just generates code to follow whatever pattern you ask for. The compiler itself is eager, but that doesn't mean your code needs to be the same.

Gradual Typing

There is an open ticket for implicit coercions, which could be used to implement Gradual Typing.

Clone this wiki locally