Brian, keep in mind that `@serialize only: [:user_1]` already works because
it's only one argument. But you cannot pass multiple arguments as for
example `@fixtures :user_1, :user_2, :user_3`.

On Sun, Aug 21, 2016 at 7:16 PM, Andrea Leopardi <[email protected]>
wrote:

> Thanks for the proposal Brain,
>
> I am -1 on this feature as I don't really see the benefit (just a very
> slight aesthetics thing) but I surely see the downside of having this
> "magic" going on. I prefer the explicitness of brackets if something is a
> list :P
>
> Also, this may create confusion because then maybe  function arguments are
> just a list without brackets for syntactic sugar? This is a question I see
> myself asking as a newcomer.
>
> On Sunday, 21 August 2016, Brian Cardarella <[email protected]> wrote:
>
>> Currently module attributes require explicit syntax to be passed. For
>> example:
>>
>> ```
>> @foobar [:a, :b, c: true]
>> ```
>>
>> It might be cleaner if we could get implied lists, keyword lists:
>>
>> ```
>> @foobar :a, :b, c: true
>> ```
>>
>> This comes into play when using module attributes for functionality
>> purposes rather than just value storage.
>> For example, with ecto_fixtures I am working on an API relying upon the
>> test module attributes:
>>
>> ```
>> @fixtures :user_1, :user_2, :user_3
>> @serialize only: [:user_1]
>> ```
>>
>> I suspect would be more idiomatic than
>>
>> ```
>> @fixtures [:user_1, :user_2, :user_3]
>> @serialize [only: [:user_1]]
>> ```
>>
>> If there is a desire for this I can handle implementation. I would just
>> need to be pointed in the right direction. (I suspect starting with the
>> tokenizer)
>>
>> --
>> 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 [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/elixir-lang-core/f4fd785e-ab39-40b6-855d-adc2602988ff%
>> 40googlegroups.com
>> <https://groups.google.com/d/msgid/elixir-lang-core/f4fd785e-ab39-40b6-855d-adc2602988ff%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
> Andrea Leopardi
> [email protected]
>
> --
> 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 [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/elixir-lang-core/CAM9Rf%2BJQ4HcauMR1R8N64Ac7eD%
> 3DOo0DWBt___7RcbBvSGZTFEg%40mail.gmail.com
> <https://groups.google.com/d/msgid/elixir-lang-core/CAM9Rf%2BJQ4HcauMR1R8N64Ac7eD%3DOo0DWBt___7RcbBvSGZTFEg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Eric Meadows-Jönsson

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAM_eapiw-QdNvSLtYNVC%2ByYjyHJtCBbzMHf%2B2q0A8J59OhWtVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to