Erlang/OTP 20.0 is released
Erlang/OTP 20.0 is a new major release with new features, quite a few (characteristics) improvements, as well as a few incompatibilities.
There are only minor changes compared to the second release candidate, some of them listed below:
- ERTS: *
erlang:term_to_binary/1
changed the encoding of all atoms fromATOM_EXT
toATOM_UTF8_EXT
andSMALL_ATOM_UTF8_EXT
. This is now changed so that only atoms actually containing unicode characters are encoded with the UTF8 tags while other atoms are encodedATOM_EXT
just as before.
Here are some of the most important news in OTP 20:
Potential Incompatibilities #
- ERTS:
- The non SMP Erlang VM is deprecated and not built by default
- Remove deprecated
erlang:hash/2
- erlang:statistics/1 with scheduler_wall_time now also includes info about dirty CPU schedulers.
- The new purge strategy introduced in OTP 19.1 is mandatory and slightly incompatible for processes holding funs
see
erlang:check_process_code/3
. - The NIF library reload is not supported anymore.
- Atoms can now contain arbitrary unicode characters which means that the
DFLAG_UTF8_ATOMS
capability in the distribution protocol must be supported if an OTP 20 node should accept the connection with another node or library. Third party libraries which uses the distribution protocol need to be updated with this. - Asn1: Deprecated module and functions removed (
asn1rt
,asn1ct:encode/3
anddecode/3
) - Ssh: client only option in a call to start a daemon will now fail
Highlights #
Erts: #
- Dirty schedulers enabled and supported on VM with SMP support.
- support for “dirty” BIFs and “dirty” GC.
- erlang:garbage_collect/2 for control of minor or major GC
- Erlang literals are no longer copied when sending messages.
- Improved performance for large ETS tables, >256 entries (except ordered_set)
- erlang:system_info/1 atom_count and atom_limit
- Reduced memory pressure by converting sub-binaries to heap-binaries during GC
- enif_select, map an external event to message
- Improvements of timers internally in the VM resulting in reduced memory consumption and more efficient administration for timers
Compiler: #
- Code generation for complicated guards is improved.
- Warnings for repeated identical map keys.
#{'a'=>1, 'b'=>2, 'a'=>3}
will warn for the repeated keya
. - By default there is now a warning when
export_all
is used. Can be disabled - Pattern matching for maps is optimized
- New option
deterministic
to omit path to source + options info the BEAM file. - Atoms may now contain arbitrary unicode characters.
compile:file/2
has an option to include extra chunks in the BEAM file.
Misc other applications #
- Significantly updated
string
module with unicode support and many new functions - crypto now supports OpenSSL 1.1
- Unnamed ets tables optimized
gen_fsm
is deprecated and replaced bygen_statem
- A new event manager to handle a subset of OS signals in Erlang
- Optimized sets add_element, del_element and union
- Added
rand:jump/0-1
- When a
gen_server
crashes, the stacktrace for the client will be printed to facilitate debugging. take/2
has been added todict
,orddict
, andgb_trees
.take_any/2
has been added togb_trees
erl_tar
support for long path names and new file formatsasn1
: the newmaps
option changes the representation ofSEQUENCE
to be maps instead of records- A TLS client will by default call
public_key:pkix_verify_hostname/2
to verify the hostname ssl
: DTLS documented in the API, experimentalssh
: improving security, removing and adding algorithms- New
math:fmod/2
For more details see https://erlang.org/download/otp_src_20.0.readme
The Erlang/OTP source can also be found at GitHub on the official Erlang repository, https://github.com/erlang/otp with tag OTP-20.0
Pre built versions for Windows can be fetched here: https://erlang.org/download/otp_win32_20.0.exe https://erlang.org/download/otp_win64_20.0.exe
On line documentation can be browsed here: https://www.erlang.org/documentation/doc-9.0-rc2/doc/
Thanks to all contributors.