Sometimes aliases get out of hand and either need to be extracted (not always ideal) or take up lots of space and are somewhat tedious to write and read through.
The example below is a common scenario when writing a Phoenix app. Would some kind of syntax like this be helpful?
defmodule # Same as writing # alias MyApp.Post # alias MyApp.User # alias MyApp.Comment # alias MyApp.Repo alias MyApp, [Post, User, Comment, Repo] end
--
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-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/cf261314-28e4-4847-be9c-12cb62cc388a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
José's idea.$ mkdir dir{1,2,3}
import java.util.{ List => JavaList, Map => JavaMap }
I'm extremely +1 on this, since it's a feature I often desired myself.As for the syntax, I think the one proposed by Paul (alias MyApp, [Post, User, Comment, Repo]) is the cleanest one, the easiest to remember and probably the more "programmable" too (the array can be built up programmatically).
--
You received this message because you are subscribed to a topic in the Google Groups "elixir-lang-core" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-lang-core/bAHpNoiDXK8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4KFhdLn7AhynU6ba9CzTRhoA1ahNh6A1rMV83jyQn9DMA%40mail.gmail.com.
--
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-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAM9Rf%2BLbTogUeS1bkoE7gmwbYy6nhGMoXBPEoB0w1kPWdCt%3DRA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/b4c37b2f-7fc9-4a2c-8b9d-3efc38be6f20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/b4c37b2f-7fc9-4a2c-8b9d-3efc38be6f20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/b4c37b2f-7fc9-4a2c-8b9d-3efc38be6f20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/b4c37b2f-7fc9-4a2c-8b9d-3efc38be6f20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
alias MyApp.{Repo, UserManager.User, UserManager.Mail}
alias MyApp.{Repo, UserManager.{User, Mail}}
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/b4c37b2f-7fc9-4a2c-8b9d-3efc38be6f20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/b4c37b2f-7fc9-4a2c-8b9d-3efc38be6f20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.