Now Reading
The Design Rules of the Elixir Sort System

The Design Rules of the Elixir Sort System

2024-01-10 16:44:25

Giuseppe Castagna OrcidLogo, Guillaume Duboc OrcidLogo, and José Valim OrcidLogo

The Artwork, Science, and Engineering of Programming, 2024, Vol. 8, Subject 2, Article 4

Submission date: 2023-05-31
Publication date: 2023-10-15
DOI: https://doi.org/10.22152/programming-journal.org/2024/8/4
Full textual content: PDF

Summary

Elixir is a dynamically-typed purposeful language working on the Erlang Digital Machine, designed for constructing scalable and maintainable functions. Its traits have earned it a surging adoption by a whole lot of business actors and tens of 1000’s of builders. Static typing appears these days to be crucial request coming from the Elixir group. We current a gradual kind system we plan to incorporate within the Elixir compiler, define its traits and design rules, and present by some brief examples learn how to use it in apply.

Creating a static kind system appropriate for Erlang’s household of languages has been an open analysis downside for nearly 20 years. Our system transposes to this household of languages a polymorphic kind system with set-theoretic sorts and semantic subtyping. To do this, we had to enhance and lengthen each semantic subtyping and the typing methods thereof, to account for a number of traits of those languages—and of Elixir specifically—such because the arity of capabilities, the usage of guards, a uniform remedy of data and dictionaries, the necessity for a brand new sound gradual typing self-discipline that doesn’t depend on the insertion at compile time of particular run-time type-tests however, slightly, takes under consideration each the sort checks carried out by the digital machine and people explicitly added by the programmer.

The system offered right here is “progressively” being carried out and built-in in Elixir, however a prototype implementation is already accessible.

See Also

The purpose of this work is to function a longstanding reference that might be used to introduce sorts to Elixir programmers, in addition to to trace at some future instructions and potential evolutions of the Elixir language.

Source Link

What's Your Reaction?
Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top