Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Update from the Elixir team - 2022

Update from the Elixir team - 2022

Faafc04d9e69b73b9f49995fd4c94d4d?s=128

Andrea Leopardi

May 20, 2022
Tweet

More Decks by Andrea Leopardi

Other Decks in Programming

Transcript

  1. Elixir Update from the core team May 2022

  2. Andrea Leopardi @whatyouhide Elixir core team, engineer for 

  3. Recap Every 6 months (May, Nov) Non-breaking versions (1.x)

  4. 1.13

  5. 1.13 December 2021 Focused on developer experience

  6. 1.13 Semantic recompilation mix xref improvements Code.Fragment Formatter plugins

  7. 1.13 defmodule MixMarkdownFormatter do @behaviour Mix.Tasks.Format def features(_opts) do [sigils:

    [:M], extensions: [".md", ".markdown"]] end def format(contents, opts) do # ... end end
  8. 1.13 # In .formatter.exs [ plugins: [MixMarkdownFormatter], inputs: [...] ]

  9. None
  10. 1.14

  11. June 2022 Requires OTP 23+ 1.14

  12. PartitionSupervisor 1.14

  13. Application supervisor Bottleneck process 1.14

  14. Application supervisor Bottleneck process 1.14 PartitionSupervisor Bottleneck process Bottleneck process

  15. children = [ {PartitionSupervisor, child_spec: {ErrorReporter, []}, name: Reporters} ]

    1.14
  16. def report_error(err) do ErrorReporter.report( {:via, PartitionSupervisor, {Reporters, self()}}, err )

    end 1.14
  17. Slicing with steps 1.14

  18. 1.14 1..10//2

  19. 1.14 Enum.slice(~w(a b c d e f g h), 1..4//2)

    #=> ["b", "d"]
  20. Expression-based inspection 1.14

  21. 1.14 IO.inspect(Version.parse!("1.0.0")) #=> #Version<1.0.0> Before:

  22. 1.14 IO.inspect(Version.parse!("1.0.0")) #=> Version.parse!("1.0.0") Now:

  23. 1.14 Version Version.Requirement MapSet Date.Range

  24. 1.14 __repr__ Python's

  25. Improved errors in binary construction* 1.14 *thanks Erlang!

  26. 1.14 In OTP 25 (part of EEP 54)

  27. 1.14 int = 1 bin = "foo" int <> bin

    ** (ArgumentError) argument error
  28. 1.14 int = 1 bin = "foo" int <> bin

    ** (ArgumentError) construction of binary failed: segment 1 of type 'binary': expected a binary but got: 1
  29. elixir-lang.org @whatyouhide