>
> But maybe my search-fu is just week (I searched on "remote function").
>

It was my bad, apparently it was over the elixir-lang-talk mailing list:
https://groups.google.com/forum/#!topic/elixir-lang-talk/Q3-bCnm6nxI

I did not search earlier because I was not at my computer. :)

Anyway, the issue with this feature is exactly the same that appeared
during the defmodulep discussion: the only way to know if a function exists
in another module is by compiling that module and today the compiler does
not work under such assumptions. It would be a medium-sized change to the
compiler and code with circular dependencies (arguable a bad thing anyway)
would no longer compile as it would run into a deadlock.  So it is at least
a backwards incompatible change.

The best option to provide such features in the short-term is by doing a
post-compilation check. Post-compilation checks could also detect circular
dependencies which we would need to deprecate if we want to have such
features at compile time in the future.

It is definitely a topic I am interested on but it also plays against many
of the runtime features in the language. For example, if we imagine
protocols compile to something such as this:

    def to_string(binary) when is_binary(binary) do
      String.Chars.Binary.to_string(binary)
    end

This could would no longer compile without adding a bit of indirection.

-- 
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%2BaSSmrxPbJQGKzk1fhu1%2BsetfMvqDWafoqxv4KxncZrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to