Dynamic, functional language designed for building scalable and maintainable applications.
Great news for Elixir coders! Finally, new 1.5 version on this language is available.
Elixir v1.5 released: https://t.co/TkvCjmYrbK
— Elixir Lang (@elixirlang) July 25, 2017
According to the developers, Elixir v1.5 brings many improvements to the developer experience and quality of life. Many of those are powered by the latest Erlang/OTP 20. This is also the last Elixir release that supports Erlang/OTP 18.
Let's figure out, what new features are available.
UTF-8 atoms, function names and variables
Elixir v1.5 supports non-quoted atoms and variables to be in UTF-8 when using Erlang/OTP 20. For example:
test "こんにちは世界" do assert :こんにちは世界 end
saudação = "Bom dia!"
IEx helpers and breakpoints
IEx got many enhancements to the developer experience.
First of all, the autocompletion system is now capable of autocompleting variables and user imports.
IEx also got new functions, such as
exports/1, for listing all functions and macros in a module, and the new
Finally, IEx also features a breakpoint system for code debugging when running on Erlang/OTP 20. The following functions have been added to aid debugging:
break!/2- sets up a breakpoint for a given
break!/4- sets up a breakpoint for the given module, function, arity
breaks/0- prints all breakpoints and their ids
continue/0- continues until the next breakpoint in the same process
open/0- opens editor on the current breakpoint
remove_breaks/0- removes all breakpoints in all modules
remove_breaks/1- removes all breakpoints in a given module
reset_break/1- sets the number of stops on the given id to zero
reset_break/3- sets the number of stops on the given module, function, arity to zer
respawn/0- starts a new shell (breakpoints will ask for permission once more)
whereami/1- shows the current location
Exception.blame/3 is a new function in Elixir that is capable of attaching debug information to certain exceptions. Currently this is used to augment
FunctionClauseErrors with a summary of all clauses and which parts of clause match and which ones didn’t.
Since blaming an exception can be expensive,
Exception.blame/3 must be used exclusively in debugging situations. It is not advised to apply it to production components such as a Logger. This feature has been integrated into the compiler, the command line, ExUnit and IEx.
Streamlined child specs
Elixir v1.5 streamlines how supervisors are defined and used in Elixir. Elixir now allows child specifications, which specify how a child process is supervised, to be defined in modules.
This release also allows developers to mark which functions in a given module are an implementation of a callback.
Elixir v1.3 introduced the Calendar module with the underlying
Datetime data types. Developers are glad to announce we consider the base Calendar API to be finished in Elixir v1.5. This release includes many enhancements, such as
Date.range/2 and the ability to convert between different calendars.
You can have more information at GitHub and Elixir-Lang.