If you are doing this at runtime and not compile-time, going through the
code server will of course be slow, as well as bottlenecked by the code
server process itself, it's a bad idea to go that route. I would want to
see the use case here, because I'm convinced there is a better way to solve
the problem you are trying to solve.

Paul

On Sun, Feb 25, 2018 at 7:03 PM Ben Wilson <benwilson...@gmail.com> wrote:

> Can you elaborate on motivating code patterns? Every instance where I've
> wanted to determine if a specific module is around has been a compile time
> question for meta-programming purposes, and the `Code.ensure_loaded?`
> function has worked great for that.
>
>
> On Sunday, February 25, 2018 at 6:56:25 PM UTC-5, t...@scalpel.com wrote:
>>
>> I've found that in practice both `Code.ensure_loaded` and
>> `Code.ensure_compiled?` are both extremely slow in practice. Also it is not
>> very intuitive that this is what you should be reaching for when attempting
>> to check what type something is. The standard pattern that has been
>> established is the "is_*" in the Kernel. I think we should continue that
>> pattern with modules as well.
>>
> --
> 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/7e022ca7-4129-47bd-b618-121bde6cf176%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/7e022ca7-4129-47bd-b618-121bde6cf176%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/CAK%3D%2B-Tv6JEwRhMMUmYWUQT4%2BTzUxvYG7DiaVsUz_XORg1Nxd2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to