📜 ⬆️ ⬇️

Erlang / OTP 17.0 released

On April 9, a major release of the Erlang / OTP 17.0 platform was released.

Erlang is a functional programming language with strict dynamic typing, designed to create distributed computing systems.


')
In release 17.0 there are a lot of new features and changes. The first thing you notice is that the version numbering scheme has been changed; there used to be R16B, R15B and so on.

Added new data type - Maps

Perhaps one of the most important innovations that everyone has been waiting for. It is best to show an example:

1> Map = #{ key1 => "Value1", key2 => "Value2"}. #{key1 => "Value1",key2 => "Value2"} 2> maps:get(key1, Map). "Value1" #{key2 := MatchValue} = Map. #{key1 => "Value1",key2 => "Value2"} 4> MatchValue. "Value2" Map2 = Map#{key3 => "Value3"}. #{key1 => "Value1",key2 => "Value2",key3 => "Value3"} Map3 = Map2#{key1 := change_value1}. #{key1 => change_value1,key2 => "Value2",key3 => "Value3"} 

In the current release, this type is marked as experimental and has a number of limitations, namely:

A full list of features that will be implemented later is here .

Erlang / OTP ported to real-time OSE

OSE is a high-performance, POSIX compatible real-time operating system that is designed to increase hardware utilization.
The highlights indicate that not all parts of the platform have been ported.

Anonymous functions can now be named.

And use them recursively:

 1> TestFun = fun Factorial(0) -> 1; Factorial(Num) when Num > 0 -> Num * Factorial(Num - 1) end. #Fun<erl_eval.30.106461118> 2> TestFun(4). 24 

Unicode Support Improvement

For example, all sources now use utf8 by default. About other improvements in more detail here .

Same



LYSE finalized new chapter on mappas - learnyousomeerlang.com/maps
Joe Armstrong on the changes - http://joearms.imtqy.com/2014/02/01/big-changes-to-erlang.html
Ready packages for your system can be found here .
Full changelog
Official news

Source: https://habr.com/ru/post/218855/


All Articles