[erlang-questions] idea: service pack one

Jack Orenstein jao@REDACTED
Tue Nov 13 23:00:17 CET 2007

On Tue, November 13, 2007 4:27 pm, Joe Armstrong wrote:

> Erlang is becoming popular and now needs to address the problems that
> our new users encounter.

As someone on the learning curve right now, I think this
is a great idea.

> 1 +++  fix nicer error messages (Done - Kenneth showed this)

This would be very useful. I've spent a lot of time puzzling over
various occurrences of badarg, noproc, function_clause and others.

Related to this: stacks with line numbers (at least for the topmost
frame) would be a big improvement.

> 4 +++ compile the @spec definitions in comments into code that
> *dynamically* checks types
>         who cares if it's slow and can't be checked statically - the
> dynamic check is very useful
>         while developing

This would be nice, but it hasn't been as big an issue for me
as error messages and line numbers. (Maybe type-checking will
be more important to me once I develop a larger body of code.)

One last suggestion: I have been debugging my code by logging.
Each log line begins with a timestamp, node, module and line.
I would like to print terms using ~p, but if I do that, then
I can no longer sort properly, because the multiline ~p output
omits the prefix values (timestamp, node, etc.) So I use ~w, which
is not very readable for nested structures, but then sorting works.
I think it would be very useful to have some way of using ~p but
still including my own logging at the beginning of each line of

It's entirely possible I'm going about logging all wrong, or maybe
there's some neat language or library trick I don't know about.
It would be nice if this service pack helped, either with a new BIF
or with documentation.

Jack Orenstein

More information about the erlang-questions mailing list