[erlang-questions] Is export always better than complie(export_all)?

Joe Armstrong <>
Thu Jun 20 18:30:28 CEST 2013


export_all should only be used when debugging
In production you should only explicitly export the functions you need.

By exporting a subset of the functions:

- your programs are easier to understand.
- the compiler could perform better optimisations
- the type checker (dialyzer) can infer better types

/Joe

On Thu, Jun 20, 2013 at 7:57 AM, 饕餮 <> wrote:

> I'm working in a program as 10,000 line code.
> Most of the time the function are changing.
> Like and some new function or change some old.
> The program is not so big that we have no document to describe our module.
> And all the team member should read all of the code.
> And I usually use compile expert_all because I feel it make the work
> easier to handle
> But one of my teammate said that I must never use export_all.
> It's that necessary to use export() instead of compile(export_all)?
> And what's the reason to use export?
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130620/1a24fa0c/attachment.html>


More information about the erlang-questions mailing list