warn_unused_vars
option to the compiler,
warnings could previously be incorrectly given for variables used
within list comprehensions.
warn_unused_vars
when compiling,
unused variables introduced inside a case
,
receive
or if
were not always reported.
list/1
, atom/1
etc. now also
have the names is_list/1
, is_atom/1
. All
these guard tests are also BIFs that can be used in expression in
function bodies, too.
is_float/1
can be used ensure that the compiler knows the
type.
ets:match/2
and
mnesia:match_object/3
, a special field named
_
can now be assigned, meaning that all fields not
explicitly assigned in the same record update will be assigned.
Example: #person{name = "Nisse", _ = '_'}
and
and or
called andalso
and orelse
have been added.
They terminate evaluation of the boolean expression as soon as the
truth value is known. The new operators cannot be used in guards.
and
, or
, and
not
can now be used in guards.
try
or cond
are used, as these will be
keywords in a future version of Erlang.
./configure
--enable-hipe
when building.) If the runtime-system is
hipe-enabled, a module can be native-code compiled like this: c(Module, [native|OtherOptions])
.
Compiling in
this way, the beam file will contain both standard beam byte-code and
the native code. If loaded on a hipe-enabled system the native code
will be loaded; otherwise the beam-code will be loaded.
HiPE is
supported for Ultra Sparc and Intel Pentium.
(Own Id: OTP-4153)