While there are reasons for removing :global, there are also reasons for
keeping it around:

1. It is kept in sync with Erlang options
2. It shows the global aspect is a mode of operation supported out of the
box
3. Erlang OTP 20/21 will ship with a much improved global mode that may
promote its use more

I have considered supporting {:registry, Name, value} once we added
Registry, to accompany bullet 2, but I haven't come up with a conclusion.

While there aren't strong reasons to keep it, there aren't also strong
reasons to remove it, so I don't want to push people through a deprecation
cycle unless we are certain which is the best way to go.



*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

On Tue, Feb 21, 2017 at 1:43 AM, Michał Muskała <[email protected]> wrote:

> Currently, Elixir behaviours accept 3 ways of naming a process - a simple
> atom, a {:global, name} tuple, and a {:via, registry, name} one. While it's
> fine, the global naming always bothered me - being this special snowflake
> wrapped in it's own tuple.
>
> Exactly the same behaviour of passing {:global, name} is achieved by
> passing {:via, :global, name}. I propose we  deprecate the global tuple in
> favour of the via tuple.
>
> This allows reducing the amount of ideas there are to learn when first
> meeting processes by one thing, and we all know there are already many.
> Additionally this would leave a consistent scheme for calling gen*
> processes: an atom name, a two-tuple for locally registered process on
> another node, and a via tuple for registries.
>
> Michał.
>
> --
> 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/c782e8f3-1ae4-4e6b-a36f-2081ddf17e00%40Spark
> <https://groups.google.com/d/msgid/elixir-lang-core/c782e8f3-1ae4-4e6b-a36f-2081ddf17e00%40Spark?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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2B4poV_Mq8k%2BJR2_otvhGV1okLn2hWCbTc4vrtp%2B0ifCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to