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

饕餮 <>
Thu Jun 20 08:54:37 CEST 2013


Yep, I can find this word in any book.
I just want to know the reason.
I use expert_all because most of the time no one will use it.
And I don't like just follow some word in book.
I think all rule have its realm.



Thank you.
I get the reason why my teammate just force me to do that.


And now I'm going to change my code.....




------------------ Original ------------------
From:  "Richard A. O'Keefe"<>;
Date:  Thu, Jun 20, 2013 02:36 PM
To:  "goofansu"<>; 
Cc:  "饕餮"<>; "erlang-questions"<>; 
Subject:  Re: [erlang-questions] 回复:  Is export always better than complie(export_all)?



I should point out that the advice "use -export, not export_all, and use it as
little as you can" is _exactly_ the same as the advice "declare every function
and top level variable 'static' if you possibly can" given to C and C++
programmers, and for the same reason, and the same as the advice given to Java
programmers "prefer private to protected, protected to (package), and package
to public; don't make a method or a field public unless you _have_ to in order
to get the job done".  There is nothing specific to Erlang here.

The whole _point_ of modules is to hide as much as you can.
See just about any good software engineering book.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130620/91c3fefe/attachment.html>


More information about the erlang-questions mailing list