Enhancement
74 changes
Optimize Access.get/2
Optimize Base encode/decode
Implement Inspect for DateTime with Calendar.ISO
Add "ISO days" format for conversions between Calendars and Date.convert/2, Time.convert/2, NaiveDateTime.convert/2 and DateTime.convert/2 (as well as bang variants)
Add :calendar field to Time struct
Add Time.diff/3, Date.add/2, Date.diff/2, DateTime.diff/3
Add Date.range/2
Add Date.new/4, DateTime.utc_now/1, NaiveDateTime.new/8 and Time.new/5 that allow specifing calendar
Add Enum.chunk_by/4 and Stream.chunk_by/4
Add Enum.chunk_every/2 and Enum.chunk_every/4 with a more explicit API than Enum.chunk/2 and Enum.chunk/4
Add Exception.blame/3 that adds metadata to exceptions
Add File.read_link/1 and File.read_link!/1
Introduce :trim_bom option for File.stream!/2
Add :printable_limit to control the limit of printable structures
Add Integer.gcd/2
Add left not in right to check that the left side is not in the enumerable on the right
Use the new debug_info chunk in OTP 20. This provides a mechanism for tools to retrieve the Elixir AST from beam files
defoverridable/1 accepts a module name as argument and marks all callbacks as overridable
Allow non-quoted Unicode atoms and variables according to Unicode Annex #31 (see Unicode Syntax document)
Warn when a :__struct__ key is used when building/updating structs
Cache the AST on definitions. This speeds up the compilation time from 10% to 15% measured across different projects
Improve compiler error message on invalid patterns and guards
Add replace/3 and replace!/3 for replacing an existing key
List.starts_with?/2
Introduce Macro.generate_arguments/2
Optimize Map.merge/3 by choosing merging direction
Add replace/3 and replace!/3 for replacing an existing key
Raise BadMapError in Map.equal?/2 when either of the two arguments is not a map
Reduce MapSet size when serialized to approximately half
Add Process.cancel_timer/2
Show available implementations on Protocol.UndefinedError if the protocol has been consolidated
Support ETS guard conditions in Registry.match/3
Support parallel: true in Registry.dispatch/3
Introduce Registry.unregister_match/4
Add Stream.chunk_every/2 and Stream.chunk_every/4 with a more explicit API than Stream.chunk/2 and Stream.chunk/4
Optimise binary pattern matching in String.split/1 and String.trim_*/1
Add Supervisor.init/2 and Supervisor.child_spec/2
Allow module and {module, arg} to be given to Supervisor.start_link/2 and invoke module.child_spec(arg) on each argument
Support :on_timeout in Task.async_stream to control how tasks are terminated
Add ordered: false support to Task.async_stream
Show code snippet from test source file in case of test errors
Use Exception.blame/3 when formatting test errors
Make assert_raise/2 fail if the underlying exception has a broken message/1 implementation
Add start_supervised/2 and stop_supervised/1 to ExUnit. Processes started by this function are automatically shut down when the test exits
Support autocompletion of variable names
Support autocompletion of functions imported using import Mod, only: [...]
Use Exception.blame/3 when showing errors in the terminal
Add exports/1 IEx helper to list all exports in a module
Add break!/2, break!/4, breaks/0, continue/0, open/0, remove_breaks/0, remove_breaks/1, reset_break/1, reset_break/3 and whereami/1 for code debugging
No longer emit warnings for IEx commands without parentheses
Add runtime_info/0 for printing runtime system information
Add open/1 to open the source of a given module/function in your editor
Implement IEx.Info protocol for calendar types
Add metadata: :all configuration to log all metadata
Add --all-warnings option to Elixir compiler that shows all warnings from the previous compilation (instead of just of the files being compiled)
Strip debug information from escripts by default and add option :strip_beam which defaults to true
Ensure --no-deps-check do not trigger SCM callbacks (such as git)
Add --if-missing flag to local.hex mix task
Add Mix.Tasks.Profile.Cprof for count-based profiling
New styling for generated applications
not left in right is soft-deprecated in favor of left not in right
Deprecate Enum.filter_map/3 in favor of Enum.filter/2 + Enum.map/2 or for-comprehensions
Deprecate GenEvent and provide alternatives in its docs
Using () to mean nil is deprecated
:as_char_lists value in Inspect.Opts.t/0 type, in favor of :as_charlists
:char_lists key in Inspect.Opts.t/0 type, in favor of :charlists
Using Erlang parse transforms via @compile {:parse_transform, _} is deprecated
Deprecate Stream.filter_map/3 in favor of Stream.filter/2 + Stream.map/2
String.ljust/3 and String.rjust/3 are deprecated in favor of String.pad_leading/3 and String.pad_trailing/3 with a binary padding
String.strip/1 and String.strip/2 are deprecated in favor of String.trim/1 and String.trim/2
String.lstrip/1 and String.rstrip/1 are deprecated in favor of String.trim_leading/1 and String.trim_trailing/1
String.lstrip/2 and String.rstrip/2 are deprecated in favor of String.trim_leading/2 and String.trim_trailing/2 with a binary as second argument
char_list/0 type is deprecated in favor of charlist/0
Deprecate <%= in "middle" and "end" expressions, e.g.: <%= else %> and <%= end %>