回复: Isexport always better than complie(export_all)?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

回复: Isexport always better than complie(export_all)?

饕餮
I know the usage of -expert().
But why it so important?
Why should we always use -expert() but not compile(expert_all)?
What's the benefit?


------------------ ???? ------------------
???: "goofansu"<goofan.su>;
????: 2013?6?20?(???) ??2:07
???: "??"<249505968>;
??: "erlang-questions"<erlang-questions>;
??: ??? [erlang-questions] Isexport always better than complie(export_all)?



                 Hi,

Exported functions are interfaces to the outsides.


Once these functions are used heavily, it is difficult to change a function.
For example, add/remove a parameter or change the function's name.



                 

--
goofansu
??? Sparrow



                                   
? 2013?6?20???????1:57??? ???
                                      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
erlang-questions
http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130620/4584b944/attachment.html>

Reply | Threaded
Open this post in threaded view
|

回复: Isexport always better than complie(export_all)?

Vance Shipley-2
On Thu, Jun 20, 2013 at 02:10:17PM +0800, ?? wrote:
}  I know the usage of -expert().
}  But why it so important?
}  Why should we always use -expert() but not compile(expert_all)?
}  What's the benefit?

If you haven't cleanly seperated the public interfaces to your modules
from their internal mechanisms you haven't designed your program, you've
only implemented it.  You are well on your way to spaghetti code which
will be a nightmare to work with.

--
        -Vance