Hi everyone,
I am working on a new project and yesterday I spent a couple hours on a bug
due to a in a keyword list. In a nutshell, I was supposed to pass
parenthesis: 10 as keywords to a function but I passed parentheses: 10.
I have fixed the issue by adding the following code:
for {k, _} <- keyword, k not in [:parentheses, :other_options], do:
raise "unknown key #{inspect(k)} in #{inspect(keyword)}"
The code is super straight-forward but I am wondering if we should add it
to Elixir to promote said validation. What do you think? Any suggestions on
where it should be defined and with which name?
Thank you!
--
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/CAGnRm4J8_RG5eeCZSw_c75Q4y19YFt-ipdnTAEa1cE2GnvwjrQ%40mail.gmail.com.