--
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.
For more options, visit https://groups.google.com/groups/opt_out.
defmacro defcast(cast, options, body) dowrap_and_delegate(:defcast, cast, Keyword.from_enum(options ++ body ++ [module: __CALLER__.module]))end
defmacro defcast(cast, options, body) doquote do{ name, args, guards, body } = unquote(__MODULE__).wrap_and_delegate(unquote(Macro.escape cast),unquote(options),unquote(Macro.escape body))# atom, quoted list, quoted list, quoted termdef name, args, guards, do: bodyendend
Hi Sasa,
Thanks, and thanks for writing this library - I like the interface it provides. I think your first suggestion is best for my case and other cases where people basically have a "singleton" actor. Having the other mechanism would also be nice but the extra flexibility would mean I still have a bit more repetition in my current use case - as compared to the first option.
--