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

Update from the Elixir team - 2022

Update from the Elixir team - 2022

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

    View full-size slide

  2. Andrea Leopardi
    @whatyouhide
    Elixir core team,


    engineer for 

    View full-size slide

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

    View full-size slide

  4. 1.13
    December 2021
    Focused on developer experience

    View full-size slide

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

    View full-size slide

  6. 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

    View full-size slide

  7. 1.13
    # In .formatter.exs


    [


    plugins: [MixMarkdownFormatter],


    inputs: [...]


    ]

    View full-size slide

  8. June 2022
    Requires OTP 23+
    1.14

    View full-size slide

  9. PartitionSupervisor
    1.14

    View full-size slide

  10. Application


    supervisor
    Bottleneck


    process
    1.14

    View full-size slide

  11. Application


    supervisor
    Bottleneck


    process
    1.14
    PartitionSupervisor
    Bottleneck


    process
    Bottleneck


    process

    View full-size slide

  12. children = [


    {PartitionSupervisor,


    child_spec: {ErrorReporter, []},


    name: Reporters}


    ]
    1.14

    View full-size slide

  13. def report_error(err) do


    ErrorReporter.report(


    {:via, PartitionSupervisor, {Reporters, self()}},


    err


    )


    end
    1.14

    View full-size slide

  14. Slicing with steps
    1.14

    View full-size slide

  15. 1.14
    1..10//2

    View full-size slide

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


    #=> ["b", "d"]

    View full-size slide

  17. Expression-based


    inspection
    1.14

    View full-size slide

  18. 1.14
    IO.inspect(Version.parse!("1.0.0"))


    #=> #Version<1.0.0>
    Before:

    View full-size slide

  19. 1.14
    IO.inspect(Version.parse!("1.0.0"))


    #=> Version.parse!("1.0.0")
    Now:

    View full-size slide

  20. 1.14
    Version


    Version.Requirement


    MapSet


    Date.Range

    View full-size slide

  21. 1.14
    __repr__
    Python's

    View full-size slide

  22. Improved errors in


    binary construction*
    1.14
    *thanks Erlang!

    View full-size slide

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

    View full-size slide

  24. 1.14
    int = 1


    bin = "foo"


    int <> bin


    ** (ArgumentError) argument error

    View full-size slide

  25. 1.14
    int = 1


    bin = "foo"


    int <> bin


    ** (ArgumentError) construction of binary failed:


    segment 1 of type 'binary':


    expected a binary but got: 1

    View full-size slide

  26. elixir-lang.org
    @whatyouhide

    View full-size slide