Unless I missed something, there is shorthand for passing properties when you have a variable of the same name?
I find myself having to write a lot of boilerplate code like this:
{:ok, assign(socket, workspace_id: workspace_id, widget: widget, thing_name: thing_name)}
Having to write (and read) workspace_id: workspace_id
and so on for each variable is a little verbose.
JavaScript added shorthand property names in ES2015
Basically, it makes:
let o = {a, b, c}
syntactic sugar for
let o = {a: a, b: b, c: c}
It would be really neat if we had something similar in Elixir.
Maybe something like
{:ok, assign(socket, %[workspace_id, widget, thing_name])}
Using %[
to distinguish it from a list - ie. keyword list shorthand.