Parse transformery (Was: Re: Calling internal functions - foo::bar() ?)
Thomas Johnsson XA (LN/EAB)
thomas.xa.johnsson@REDACTED
Wed Mar 23 08:58:12 CET 2005
(Wading through some backlogs ...:-)
klacke@REDACTED:
>
> Speaking for myself. The ability to call private functions
> in _live_ systems far outweigh performance considerations
> in the systems I have been involved in lately.
>
> Therefore I almost always use -compile(export_all)
> in most of my modules. Later ... way later when a
> module has stabilized, I might (if I get the time)
> do a later overhaul and explicitly export the API
> functions.
So how about the following suggestion:
- You write your -export declarations, properly, for soft.eng. purposes.
- For development & debuggning, put in a -compile(export_all) also!
- Let the compiler and/or otp *warn* if you're using something exported by an export_all
but not a proper -export.
I imagine that to make a proper job of the last point, the compiler needs to put
additional information in the beam file, namely mark the functions export_all:ed but not
exported.
-- Thomas
More information about the erlang-questions
mailing list