Re: [elixir-core:6784] defstruct

2016-12-27 Thread Louis Pop
I use a lot of structs, so I'd like this shorthand. I don't think wrapping the current syntax in a module is a problem though. You couldn't really implement this as a macro and save any typing as you'd need to require the macro before using it, which would probably be about the same amount of char

Re: [elixir-core:6784] defstruct

2016-12-27 Thread Akio Burns
I think the nature of structs in their present state—being visually tied to a `defmodule`—limits the thinking around them. I think that given the ability to create structs "at-will", opportunities will present themselves where one would've previously used a tuple or a plain map. Some contrived