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

Update from the Elixir team - 2018

Update from the Elixir team - 2018

Andrea Leopardi

May 31, 2018
Tweet

More Decks by Andrea Leopardi

Other Decks in Programming

Transcript

  1. • Follow two- to three-part commands: "Put your book away,

    brush your teeth, and then get in bed." • Recognize familiar word signs such as "STOP" • Better understand the concept of time • Count ten or more objects • Correctly name at least four colors and three shapes Elixir 1.0 is almost 4yo
  2. def foo ( a, b ) do a+ b end

    def foo(a, b) do a + b end
  3. Feature complete formats code is configurable (for some things) supports

    formatting entire Mix projects (.formatter.exs)
  4. @deprecated/@since @doc "Breaks a collection into chunks" @since "1.0.0" @deprecated

    "Use chunk_every/2 instead" def chunk(collection, chunk_size) do chunk_every(collection, chunk_size) end
  5. @deprecated/@since @doc "Breaks a collection into chunks" @since "1.0.0" @deprecated

    "Use chunk_every/2 instead" def chunk(collection, chunk_size) do chunk_every(collection, chunk_size) end
  6. @deprecated/@since @doc "Breaks a collection into chunks" @since "1.0.0" @deprecated

    "Use chunk_every/2 instead" def chunk(collection, chunk_size) do chunk_every(collection, chunk_size) end
  7. UX

  8. --slowest N $ mix test --slowest 2 Finished in 1.4

    seconds Top 3 slowest (0.9s), 61.0% of total time: * test client suicide (602.8ms) (RedixTest) * test unable to connect (201.2ms) (RedixTest) * test timeouts (101.8ms) (RedixTest)
  9. use ExUnitProperties
 property "bin1 <> bin2 always starts with bin1"

    do check all bin1 <- binary(), bin2 <- binary() do assert String.starts_with?(bin1 <> bin2, bin1) end end
  10. Standard API for all BEAM languages Access to docs in

    the shell + (Elixir already has this)
  11. check all arg1 <- from_type(timeout/0) do result = my_fun(arg1) assert

    is_integer(result) end @spec my_fun(timeout()) :: integer()