>
>
> 1: That doesn't solve the issue of sharing constants between modules
>

You can just use atoms in both places.


> 2: I use strings because I match it against user supplied input that I do
> not want to convert to atoms
>

You can write a straight-forward conversion function:

def from_user_input("less_than"), do: :less_than
def from_user_input("greater_than"), do: :greater_than
...

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-talk" 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-talk/CAGnRm4Ky4XpLriBDfFpM51CmW5LC4Tn34gW7GNGd%2Bw8JtNFbkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to