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:
- The value can be retrieved only by auxiliary functions, but the following construction cannot be used: Value = Map # {key1}
- You cannot set a key that is not known at compile time.
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
- New option {active, N} for TCP, UDP and SCTP sockets
- Improved mapping from ASN.1 OCTET STRING and bit strings to Erlang types, and other improvements and optimizations to ASN.1
- Added a new, optional, mechanism for balancing the use of the scheduler
- Added experimental ability to use dirty schedulers
LYSE finalized new chapter on mappas -
learnyousomeerlang.com/mapsJoe Armstrong on the changes -
http://joearms.imtqy.com/2014/02/01/big-changes-to-erlang.htmlReady packages for your system can be found
here .
Full changelogOfficial news