• 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
Slide 9
Slide 9 text
Release every 6 months
v1.5 → mid 2017
v1.6 → beg 2018
v1.7 →
Slide 10
Slide 10 text
IMPROVEMENTS IN v1.6
Slide 11
Slide 11 text
No content
Slide 12
Slide 12 text
Code formatter
Slide 13
Slide 13 text
def foo (
a, b ) do a+ b
end
def foo(a, b) do
a + b
end
Slide 14
Slide 14 text
Feature complete
formats code
is configurable (for some things)
supports formatting entire Mix projects (.formatter.exs)
Slide 15
Slide 15 text
No content
Slide 16
Slide 16 text
Dynamic supervisor
Slide 17
Slide 17 text
simple_one_for_one
confusing/mixed API
documentation
"Just like simple_one_for_one but actually simple"
Slide 20
Slide 20 text
Documentation
Slide 21
Slide 21 text
@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
Slide 22
Slide 22 text
@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
Slide 23
Slide 23 text
@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
Slide 24
Slide 24 text
Library guidelines
Slide 25
Slide 25 text
Compatibility table with Erlang/OTP
Slide 26
Slide 26 text
Table of deprecations
Slide 27
Slide 27 text
UX
Slide 28
Slide 28 text
--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)
Slide 29
Slide 29 text
10-20% compilation speedup with OTP21
definitely thanks to us
Slide 30
Slide 30 text
defguard
Slide 31
Slide 31 text
defguard is_drinking_age(age) when age >= 21
def serve_drink(%User{age: age})
when is_drinking_age(age) do
# Serve the drink
end
Slide 32
Slide 32 text
FUTURE
Slide 33
Slide 33 text
No content
Slide 34
Slide 34 text
StreamData
data generation
property-based testing
+
Slide 35
Slide 35 text
Enum.take(StreamData.integer(), 2)
#=> [1, -2]
Slide 36
Slide 36 text
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
Slide 37
Slide 37 text
only stateless testing...
...but discussion started
for stateful testing
Slide 38
Slide 38 text
__STACKTRACE__
Slide 39
Slide 39 text
try do
apply(mod, fun, args)
catch
:error, val ->
{:error, {val, __STACKTRACE__}}
end
Slide 40
Slide 40 text
Configuration and releases
Slide 41
Slide 41 text
Solve problems with Mix.Config
Streamline releases and integrate with Mix
Slide 42
Slide 42 text
Docs chunk
Slide 43
Slide 43 text
EEP 48
documentation storage and format
Slide 44
Slide 44 text
Standard API for all BEAM languages
Access to docs in the shell
+
(Elixir already has this)