v1.2 brings enhancements, bug fixes, performance improvements and more into Elixir. Elixir v1.2 supports only Erlang 18. Upgrading to Erlang 18 is therefore recommended before upgrading Elixir.
- [Base] Optimize encode and decode operations about 10 times
- [Enum] Use the faster and auto-seeding
:rand
instead of:random
inEnum.shuffle/1
andEnum.random/1
andEnum.take_random/2
- [Kernel] Support multiple aliases in
alias
,import
,require
anduse
. For example,alias MyApp.{Foo, Bar, Baz}
- [Kernel] Add
struct!/2
. Similar tostruct/2
but raises on invalid keys - [Kernel] Warn if
@doc/@typedoc/@moduledoc
attributes are redefined - [Kernel] Mark quoted expressions as generated avoiding false positives on dialyzer
- [Kernel] Allow variables as map keys on creation
%{key => value}
and on matches%{^key => value}
- [Kernel] Allow the pin operator
^
infn
clauses and on the left side of<-
infor
comprehensions - [Macro] Add
Macro.traverse/4
that performs pre and post-walk at once - [Macro] Add
Macro.camelize/1
andMacro.underscore/1
- [Process] Add
Process.get_keys/0
- [String] Introduce
String.trim_{prefix,suffix,leading,trailing}/2
. The first two will remove only the first occurrence of the given match in string. The last two will remove all occurrences of the given match - [String] Support
String.normalize/2
andString.equivalent?/2
that perform NFD and NFC normalization - [Task] Add
Task.Supervisor.async_nolink/1/3
that spawns a supervised task without linking to the caller process
- [IEx] Display type docs for
t(Module.type)
andt(Module.type/arity)
- [IEx] Display a list of all modules with
m/0
or module specific information withm/1
- [Mix] Cache and always consolidate protocols
- [Mix] Add
warn_test_pattern
tomix test
that will warn on potentially misconfigured test files
- [Mix] Always run non-recursive tasks at the umbrella root
- [Mix]
Mix.Utils.camelize/1
andMix.Utils.underscore/1
are soft deprecated in favor ofMacro.camelize/1
andMacro.underscore/1