[erlang-questions] Style wars: junk comments

Steve Davis steven.charles.davis@REDACTED
Sun Sep 16 21:12:16 CEST 2012


Since you can invent attributes, I have played with:

-api({{Name, Arity}, "Short Descriptive Usage Comment"}).

...as a means of compiling brief module self-documention that is visible in X:module_info(attributes).

On Sep 13, 2012, at 11:42 PM, Richard O'Keefe <ok@REDACTED> wrote:

> 
> On 14/09/2012, at 11:56 AM, Steve Davis wrote:
>> There *is* an issue between making a distinction between -export for API use and -export needed for use only within the app or library.
> 
> That is what -export_to was invented for.  It's not just that you
> want to >say< that something is exported for very specific reasons,
> you want to >enforce< that it's only usable by things you mean to
> export it to.  It is also more precise than "internal exports",
> which I used to think only meant functions exported back to the
> module itself for use with 'apply'.
> 
> The intellectual debt to Eiffel's {targeting} of feature availability
> seems obvious, but if memory serves me correctly, I thought of
> -export_to before I learned Eiffel.
> 




More information about the erlang-questions mailing list