|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: Elixir v0.7.2 released |
| 4 | +author: Yurii Rashkovskii |
| 5 | +category: Releases |
| 6 | +excerpt: Elixir v0.7.2 is released, new, improved type specifications syntax and many other improvements. |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +Hot out of the oven! We just released Elixir v0.7.2 with a number of delicious improvements. |
| 11 | + |
| 12 | +One of the most important changes in this minor release is a partial rehaul of |
| 13 | +the type specification syntax. |
| 14 | + |
| 15 | +Here's the gist: |
| 16 | + |
| 17 | + @spec myfun(integer), do: integer |
| 18 | + # becomes |
| 19 | + @spec myfun(integer) :: integer |
| 20 | + |
| 21 | + @type a :: fun |
| 22 | + # becomes |
| 23 | + @type a :: (... -> any) or ((...) -> any) or (fun(...) -> any) |
| 24 | + @type a :: fun(do: integer) |
| 25 | + # becomes |
| 26 | + @type a :: (() -> integer) or (fun() -> integer) |
| 27 | + @type a :: fun(integer, do: integer) |
| 28 | + # becomes |
| 29 | + @type a :: (integer -> integer) or ((integer) -> integer) or (fun(integer) -> integer) |
| 30 | + @type a :: fun(integer, integer, do: integer) |
| 31 | + # becomes |
| 32 | + @type a :: (integer, integer -> integer) or ((integer, integer) -> integer) or (fun(integer, integer) -> integer) |
| 33 | + |
| 34 | +Another change is that Mix now echoes the output of external tools |
| 35 | +such as git and rebar, and handles exit status correctly. This have previously |
| 36 | +led to some less-than-perfect workflows. |
| 37 | + |
| 38 | +We've also added a more compact and visual form of the `function` helper. Now, instead of `function(Enum, :all?, 2)` you can use `function(Enum.all?/2)`. |
| 39 | + |
| 40 | +We've also figured out how to achieve an up to 6x [performance increase](https://github.com/elixir-lang/elixir/blob/v0.7.2/lib/elixir/lib/kernel.ex#L1386-L1417) when using records. |
| 41 | + |
| 42 | +...and [many other fixes & improvements](https://github.com/elixir-lang/elixir/blob/v0.7.2/CHANGELOG.md). |
| 43 | + |
| 44 | +Lastly, but not least importantly, I'd like to mention that we're very excited about how the community around Elixir is building up. Thank you all for being around and supporting us! |
| 45 | + |
| 46 | +[Learn more about Elixir](/getting_started/1.html)! |
0 commit comments