Erlang language issues

Sean Hinde Sean.Hinde@REDACTED
Mon Apr 22 16:43:03 CEST 2002

> > Erlang is a declarative language. What are these 
> /%comment%/ things used for
> > again?

> The code tells the computer what to do.
> The comments might, on a good day,  give you a faint clue as 
> to what the 
> program was supposed to do.

Or on a bad day, when the comments are way out of date, quite possibly lead
you right up the garden path.

I guess my point was the rather tired old one that if you understand the
problem domain, and choose meaningful function names then it should be
pretty self evident what the program does. Agreed that reading other peoples
C programs is often almost impossible without comments, but reading Erlang
is not often that hard except for maybe any really tricky synchro bits (in
which case comments about this would be fairly meaningless taken in

Here at T-Mobile (UK) we tend to work by writing a Functional Spec which has
pretty pictures and a wide audience/review. The code tends to be a
straightforward declaration of the contents of this doc. I have thought
about edoc style/literate programming before but never quite saw the value
add in the context of this type of work (Emacs doesn't do pictures for
example, and if the audience is only other programmers then too many words
can get in the way of the reality).

Maybe it's of most use for library writers where the API docs can be kept
with the code (OK, OK I know the point is supposed to be a complete culture
change in the way programming is done but pending that there must be some
use for this stuff :))


(Who recently spent two weeks finishing off someone's pretty much
undocumented code while they were on holiday, and having no problems
understanding any of it)

This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.

More information about the erlang-questions mailing list