Hey Jony Would this involve some form of compile time type checking for these values? If not we already have them in the form of tuples.
@type result :: {:ok, string()} | {:error, string()} If you want compile time checks this would be more difficult. I've experimented a little with compile time checks with macros, check it out here -> https://github.com/lpil/sum Cheers, Louis On Fri, 16 Feb 2018 at 10:33 <maennc...@joshmartin.ch> wrote: > Hi all, > > First I want to thank you all for your great work on the elixir language! > > Have there been some thoughts to introduce Tagged Unions into elixir? > I would really love to use sum types like Either or simple enums in my > daily work and have some support of the language in handling them. > > What do you think about this? > > Cheers, > Jony > > -- > 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/4052d8d9-6eda-46c9-b259-fb0f2e041120%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/4052d8d9-6eda-46c9-b259-fb0f2e041120%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CABu8xFDq1ck4HbQpb9SEaQ_AEK9Wk1a2132Qf_4KTnVgOx4b8Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.