> I would propose to add this to the Kernel module, to mirror the struct! 
helper. But adding to Keyword also works. Thoughts?

Makes sense! I suggested Keyword mostly because there's the module already, 
but since we have struct! in Kernel, it might be better to have keyword! 
there too. Usage would also be nicer this way.

> Should the bang version really raise for redundant options?

As José said, it would help clean out stray options being passed. I can 
think of a few cases in which I thought one option was being used, but had 
either a typo or wrong name altogether (think "end" vs "end_datetime" sort 
of situation).
However, I can see a less strict version being useful as well. Perhaps 
there could be a keyword!/3 which accepted options like: keyword!(opts, 
[extra_keys: true], key1: :default1, key2: :default2)

-- 
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-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/01760987-49bc-4801-865e-9889facbd436n%40googlegroups.com.

Reply via email to