While playing with deployment I found out that some libraries provide this 
feature that you can put {:system, var} in configuration and then it's 
resolved at runtime. However if it's in my code, I'd have to implement it 
on my own. Wouldn't it be nice if it was supported by Application module by 
default? Something like:
def get_env(app, key, default \\ nil) do
  case :application.get_env(app, key, default) do
    {:system, var} ->
      System.get_env(var) || default
    rest ->
      rest
  end
end

Would it make sense?

-- 
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/cf09772c-0540-49ef-998b-80747436f7bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to