Elixir v0.13 upcoming!

166 views
Skip to first unread message

José Valim

unread,
Apr 9, 2014, 12:47:33 PM4/9/14
to elixir-l...@googlegroups.com, elixir-l...@googlegroups.com
Hello everyone!

Elixir v0.13 is the biggest Elixir release since we have been doing releases, so there is plenty to look forward to!

The code is available on the master branch which is where you can also find the CHANGELOG:


You can help us test this release by installing Erlang 17.0 (just released, available here), updating Elixir to master and running/compiling/testing your existing projects. Note this release is meant to be fully backwards compatible, so if you find any regression, do let us know!

Also note there are soft deprecations in the CHANGELOG and now it is a great time to start working on them (so you don't get warnings in the future).

The final date for Elixir v0.13 is any time now. We have two build tools and we are expecting at least one of them to catch up and upgrade to Erlang 17.0 before the release. As soon as one of them do and if we have no outstanding regressions, we will do a new release.

Thank you!


José Valim
Skype: jv.ptec
Founder and Lead Developer

José Valim

unread,
Apr 10, 2014, 7:05:12 AM4/10/14
to elixir-l...@googlegroups.com, elixir-l...@googlegroups.com
We have pushed a couple changes to master since the announcement:

1. defstruct expects a keyword list at expansion time. This means the following construct is no longer valid:

    my_fields = [a: 1, b: 2]
    defstruct my_fields

Nor:

    defstruct %{a: 1, b: 2}

I will expand on the rationale for this in another e-mail.

2. The Record module has changed. Previously, the Record module documentation was about the to-be-deprecated-Elixir-Records. We have just changed it to be about the records from now on (which are basically wrappers around Erlang records).

In other words, all of the publicly documented functions in the Record module in v0.13 are meant to be public and they are not going to be deprecated. The old API still works (because we want to keep backwards compatibility) however the old API is marked as "@doc false" and will be deprecated in future releases.

Cheers!




José Valim
Skype: jv.ptec
Founder and Lead Developer


Dave Thomas

unread,
Apr 15, 2014, 10:24:28 AM4/15/14
to elixir-l...@googlegroups.com, elixir-l...@googlegroups.com


2. The Record module has changed. Previously, the Record module documentation was about the to-be-deprecated-Elixir-Records. We have just changed it to be about the records from now on (which are basically wrappers around Erlang records).

In other words, all of the publicly documented functions in the Record module in v0.13 are meant to be public and they are not going to be deprecated. The old API still works (because we want to keep backwards compatibility) however the old API is marked as "@doc false" and will be deprecated in future releases.

​Two questions related to this:

1. What advice should I give readers about records vs. maps. When should they use one or the other?

2. What is the future of protocols?


Dave​

José Valim

unread,
Apr 15, 2014, 10:33:42 AM4/15/14
to elixir-l...@googlegroups.com, elixir-l...@googlegroups.com
1. What advice should I give readers about records vs. maps. When should they use one or the other?

Just use a record if you need to interface with Erlang code that requires records.

One could choose to use a record also for passing small (two, three fields max) private data around, like we do with Inspect.Algebra. However, records are just a solution just because we lack proper support for easily creating patterns (something like defpattern).
 
2. What is the future of protocols?

Protocols remain mostly the same. I expect them to be considerably faster though. Currently we dispatch on structs (based on the value of __struct__) and we dispatch on records too. In the future, { Hello, :world } will always dispatch to the tuple implementation (i.e. you can no longer implement protocols for recods).

Dave Thomas

unread,
Apr 15, 2014, 11:31:33 AM4/15/14
to elixir-l...@googlegroups.com, elixir-l...@googlegroups.com


2. What is the future of protocols?

Protocols remain mostly the same. I expect them to be considerably faster though. Currently we dispatch on structs (based on the value of __struct__) and we dispatch on records too. In the future, { Hello, :world } will always dispatch to the tuple implementation (i.e. you can no longer implement protocols for recods).

​Is it worth removing the part about protocols in the Record moduledoc?​

José Valim

unread,
Apr 15, 2014, 11:46:00 AM4/15/14
to elixir-l...@googlegroups.com, elixir-l...@googlegroups.com
The new docs no longer talk about protocols.... although I need to push them online:


 



José Valim
Skype: jv.ptec
Founder and Lead Developer


--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dave Thomas

unread,
Apr 15, 2014, 11:54:19 AM4/15/14
to elixir-l...@googlegroups.com, elixir-l...@googlegroups.com

On a related note, will you be adding back an option to inspect to display records as tuples?



--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.

Dave Thomas

unread,
Apr 15, 2014, 11:55:58 AM4/15/14
to elixir-l...@googlegroups.com, elixir-l...@googlegroups.com
aarrgh—I hadn't realized you'd switched over to master—I've been working out of 0.13...


On Tue, Apr 15, 2014 at 10:46 AM, José Valim <jose....@plataformatec.com.br> wrote:

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages