Elixir

7c12adb8b5521c060ab4630360a4fa27?s=47 Plataformatec
November 18, 2012

 Elixir

This talk highlights the reason, goals and roadmap behind Elixir, http://elixir-lang.org

7c12adb8b5521c060ab4630360a4fa27?s=128

Plataformatec

November 18, 2012
Tweet

Transcript

  1. 22.

    defmodule MyModule do def some_function(foo) do # ... end IO.puts

    "hello" def other_function(bar) do # ... end end elixir Monday, November 19, 2012
  2. 24.

    :foo - atoms/symbols { 1, 2, 3 } - tuples

    [ 1, 2, 3 ] - lists Monday, November 19, 2012
  3. 26.

    1 + 2 function line args { :+, 1, [1,2]

    } Monday, November 19, 2012
  4. 27.

    defmacro unless(expr, opts) do quote do if(!unquote(expr), unquote(opts)) end end

    unless(true, do: exit()) elixir Monday, November 19, 2012
  5. 29.

    defmodule MathTest do use ExUnit.Case test "basic operations" do assert

    1 + 1 == 2 end end elixir Monday, November 19, 2012
  6. 30.

    defmodule MathTest do use ExUnit.Case def test_basic_operations do assert 1

    + 1 == 2 :ok end end elixir Monday, November 19, 2012
  7. 31.

    assert 1 + 1 == 2 { :==, 5, [1

    + 1, 2] } function line args Monday, November 19, 2012
  8. 32.

    # assert 1 + 1 == 2 defmacro assert({ :=~,

    line, [l,r] }) do # ... end defmacro assert({ :==, line, [l,r] }) do # ... end defmacro assert(default) do # ... end Monday, November 19, 2012
  9. 34.

    -module(json). to_json(Item) when is_list(Item) -> % ... to_json(Item) when is_binary(Item)

    -> % ... to_json(Item) when is_number(Item) -> % ... erlang Monday, November 19, 2012
  10. 37.

    defimpl JSON, for: List do # ... end elixir defimpl

    JSON, for: Binary do # ... end defimpl JSON, for: Number do # ... end Monday, November 19, 2012
  11. 42.

    There is no conversion cost for calling Erlang from Elixir

    and vice-versa Monday, November 19, 2012
  12. 43.

    • UTF-8 binaries strings • Keyword arguments • First-class documentation

    • First-class regular expressions • Zero-index access • ... Monday, November 19, 2012
  13. 45.

    defmodule MathTest do use ExUnit.Case, async: true test "basic operations"

    do assert 1 + 1 == 2 end end elixir Monday, November 19, 2012
  14. 46.

    1 MathTest 2 SystemTest 3 ... 4 ... 5 ...

    6 ... 7 ... 8 ... ExUnit. Runner ExUnit. Formatter Monday, November 19, 2012
  15. 47.

    1 MathTest 2 SystemTest 3 ... 4 ... 5 ...

    6 ... 7 ... 8 ... ExUnit. Runner run ExUnit. Formatter Monday, November 19, 2012
  16. 48.

    1 MathTest 2 SystemTest 3 ... 4 ... 5 ...

    6 ... 7 ... 8 ... ExUnit. Runner run ExUnit. Formatter Monday, November 19, 2012
  17. 49.

    1 MathTest 2 SystemTest 3 ... 4 ... 5 ...

    6 ... 7 ... 8 ... ExUnit. Runner run ExUnit. Formatter Monday, November 19, 2012
  18. 50.

    1 MathTest 2 SystemTest 3 ... 4 ... 5 ...

    6 ... 7 ... 8 ... ExUnit. Runner done ExUnit. Formatter info Monday, November 19, 2012
  19. 51.

    1 MathTest 2 SystemTest 3 ... 4 ... 5 ...

    6 ... 7 ... 8 ... ExUnit. Runner ExUnit. Formatter run Monday, November 19, 2012
  20. 52.

    127.0.0.9 127.0.0.3 1 MathTest 2 SystemTest 3 ... 4 ...

    5 ... 6 ... 7 ... 8 ... ExUnit. Runner ExUnit. Formatter Monday, November 19, 2012
  21. 53.

    127.0.0.9 127.0.0.3 1 MathTest 2 SystemTest 3 ... 4 ...

    5 ... 6 ... 7 ... 8 ... ExUnit. Runner ExUnit. Formatter ExUnit. Supervisor Monday, November 19, 2012
  22. 55.

    • v0.6 (Aug/12) Erlang language compatibility • v0.8 (Dec/12) Erlang

    apps support • Dynamo (xx/13) Web framework • v0 (Jan/11) Monday, November 19, 2012