[erlang-questions] Re: implementing annotation in erlang
Igor Ribeiro Sucupira
Thu Sep 3 05:05:46 CEST 2009
I believe Pawel is not worried about having to recompile.
The key (most difficult) functionality he needs is to be able to
change the name of a function without having to change *anything*
So, for example, if command "getDevTimeCmd" is associated with fun
some_module:getTime/0 and you then decide to change the name of
getTime to getLocalTime (and recompile), you would automagically have
"getDevTimeCmd" associated to fun some_module:getLocalTime/0.
I don't think this can be done in Erlang (but what do I know? :)).
Fred's neat solution got close, but you still have to change somewhere
else if you rename fun test/0 to fun run_test/0, for example. However,
at least the change would be in the same module, which is already an
advantage over what I and other people have proposed.
On Wed, Sep 2, 2009 at 9:37 PM, Steve
> I think you are trying to force a "java way" onto the platform.
> Have you considered using records defined in the header (hrl) for
> those arguments? i.e. if you are using annotations in java you are
> recompiling source in any case when you make the change. If you make
> them into records then you'll equivalently be recompiling across the
> entire application code, which appears to me to be an equivalent way
> of making the change.
> ...or did I misunderstand the problem?
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
More information about the erlang-questions