Erlang language issues
Thu Apr 18 16:34:59 CEST 2002
> On Thu, 18 Apr 2002, Eric Merritt wrote:
> > Are there no tools for extracting comments from C++
> > code? If Erlang uses the
> > same comment syntax as in C++, then one should be
> > abel to use those tools.
> I believe that most comment extraction/document
> generators do at least some minimal amount of language
> parsing. Thus you would be able to use these without
> some, possibly extensive, modifications.
Yes but but but ....
The problem with using existing tools is always that:
1) They do not work in *every* Erlang environment
2) They never do *exactly* what you want
Now if they do "almost what you want" you have to modify them and
port them to all Erlang environments.
IMHO all tools for supporting Erlang code should be 100% pure Erlang
programs (thus problem (1) is immediately solved).
Modifing some almost right thing to make it do what you
want is often far more difficult than "rolling your own from scratch".
In the case we are discussing (extracting comments from code) the problem
is trivial and a non-starter - formatting them is a tad more difficult
but no big deal.
Deciding what the code formatter should do is the tricky bit - expect many
hours of heated discussion here :-) - but once you've decided what to
do coding up the result is probably only a few hours hack.
Modifing an existing program *desiged to run with C++* seems like
a major project to me - but then any simple project can be made
arbitrarily difficult by appropriate re-use of tools that you didn't
implement yourself and which were designed to do something else :-)
I favor re-inventing the wheel - much quicker to make a new
wheel that works than bodge up an old one that doesn't.
> In any case, what value would we get by using the '//'
> for eol comments we already have '%' which is actually
> shorter to type and just as easy to read. I personnaly
> dont see any reason to change this style of comments.
> I seams that all we would get from this are comments
> that looked like C comments - small return for any
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
More information about the erlang-questions