Complexity Shock Horror II: the Sequel (was Re: MD5 in erlang.)

Chris Pressey <>
Thu Mar 27 08:13:16 CET 2003


On Wed, 26 Mar 2003 21:34:39 +0100
Matthias Lang <> wrote:

> Jeff Einhorn writes:
> 
>  > Does erlang have any built in functions for converting binary to
>  > hex?
> 
> No BIF, but there's httpd_util:integer_to_hexlist/1. See 
> 
>   http://www.erlang.org/doc/r9b/lib/inets-3.0/doc/html/httpd_util.html

<sour>

Every few months this comes up and every time it does I get more
irritated.

Before you choose to call httpd_util:integer_to_hexlist/1 from your
program, PLEASE consider the following excerpt.

>From http://www.erlang.se/doc/programming_rules.shtml :

3.3  Put commonly used code into libraries - "Great effort should be
made in ensuring that libraries contain functions of the same type. Thus
a library such as lists containing only functions for manipulating lists
is a good choice, whereas a library, lists_and_maths containing a
combination of functions for manipulating lists and for mathematics is a
very bad choice."

I count 16 functions in httpd_util that have *ABSOLUTELY*NOTHING* to do
with HTTP.

Makes me want to scream, it does.

</sour>

-Chris



More information about the erlang-questions mailing list