Re: I am close to using a behaviour as a pure interface and I feel dirty...
Kostis Sagonas <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <[email protected]> |
On 8/26/21 9:27 AM, Stanislav Ledenev wrote: > And I would recommend spending more time with tools but be careful though. Yes, both of these are good pieces of advice. The second is also applicable to what one writes about the tools of the Erlang ecosystem. > For example, due to dynamic nature of the language you write in your > code something > like this: > foo() -> > Result = hjsdfkjsdhfskjfhskhskhfskl:yutyrutyriuyiw(), > ... > > And it will compile. Because you can bring the module > "hjsdfkjsdhfskjfhskhskhfskl" later > and the compiler doesn't know that. And the Dialyzer won't tell you > anything... > But the "xref" tool may tell you that you are probably using an unknown > function in an unknown module. Surely Dialyzer will tell you that there is an unknown function in the module that you analyze. Other than speed, there is no reason to use 'xref' for this simple task. Kostis