Hacker News new | ask | show | jobs
by bratsche 3821 days ago
There are two really great additions to Elixir 1.2: multi-alias, and matching variables in map keys.

Previously I found myself wanting to alias a lot of things, like:

    alias Foo.User
    alias Foo.Email
    alias Foo.Location
Now with multi-aliasing I can do it all in one line:

    alias Foo.{User, Email, Location}
That's just a cool syntactic sugar kind of thing that maybe saves a few lines at the top of the file. But the map key matching is great, and something that I've frequently missed up until now.