elixir-lang/elixir — pull request #1347 by josevalim (2013-06-30 16:43:18+00:00)
Title: Allow update access syntax for records backed by a module

This pull request introduces three main changes:

1. It cleans up and reorganize records tests;

2. It rewrites the whole introduction to records (check out the moduledoc for Record), in order to provide a linear story introducing `defrecordp` and `defrecord`, as well as the difference in between them, and when to use one over the other;

3. It introduces an update syntax for records backed by a module (i.e. defined via `defrecord`). This syntax reflects the existing macro syntax:

```elixir
defrecord User, [:name, :age]
user = User.new
user = User[user, name: "José"]
user.name
#=> "José"
```