I looked in the archives before posting this and couldn't find anything related. But maybe my search-fu is just week (I searched on "remote function").
The topic you're thinking of from a few days ago might be my proposal for `defmodulep` (it also involves remote function calls), but it's pretty different (in my mind, at least): https://groups.google.com/forum/#!topic/elixir-lang-core/X18SZnSDW7U On Thursday, May 5, 2016 at 11:44:26 PM UTC-7, José Valim wrote: > > There is a very similar discussion on this topic a couple days ago. I also > remember we discussed it in the past. Can you please try looking up in the > archives and let us know if you found it? > > On Friday, May 6, 2016, Myron Marston <[email protected] <javascript:>> > wrote: > >> Given the following module definition: >> >> defmodule MyMod do >> def fun_1 do >> 0 >> end >> >> def fun_2 do >> fon_1 + 1 >> endend >> >> …Elixir provides a nice compile-time error informing me that >> MyMod.fon_1/1 does not exist: >> >> ** (CompileError) test/foo_test.exs:7: undefined function fon_1/0 >> (stdlib) lists.erl:1337: :lists.foreach/2 >> (stdlib) erl_eval.erl:669: :erl_eval.do_apply/6 >> (stdlib) erl_eval.erl:122: :erl_eval.exprs/5 >> >> But if I call an undefined remote function: >> >> defmodule MyMod do >> def fun_1 do >> 0 >> end >> >> def fun_2 do >> MyMod.fon_1 + 1 >> endend >> >> …then Elixir does not provide a compile-time error. Instead, a runtime >> error is raised when fun_2 is called: >> >> ** (UndefinedFunctionError) undefined function MyMod.fon_1/0 >> stacktrace: >> MyMod.fon_1() >> test/foo_test.exs:7: MyMod.fun_2/0 >> test/foo_test.exs:15 >> >> Is there anything preventing Elixir from providing a compile-time error >> in this case? Obviously, if a remote function call is made using a module >> variable (e.g. var.foo()) the compiler can’t statically know what >> functions var exports. But if the remote function call is made on a >> static alias, it seems like the compiler should be able to figure it out. >> >> Thanks, >> Mron >> >> >> -- >> 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/CADUxQmtuLSokWRJA0prd9bnguSepcYL6fyFWcTA%3Dw%2BntNYn88A%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/elixir-lang-core/CADUxQmtuLSokWRJA0prd9bnguSepcYL6fyFWcTA%3Dw%2BntNYn88A%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > -- > > > *José Valim* > www.plataformatec.com.br > Skype: jv.ptec > Founder and Director of R&D > > -- 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/21edf743-593a-467a-8ce7-4d59f92c8ba8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
