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

Chris Pressey cpressey@REDACTED
Sat Apr 12 06:22:46 CEST 2003

On Fri, 11 Apr 2003 10:26:11 +0200
Raimo Niskanen <raimo.niskanen@REDACTED> wrote:

> Robert Virding wrote:
> > I am strongly for consistency and simplicity.
> So am I, but only as long as it also is useful.

All I (and I assume other people) am looking for is a function which
converts integers to strings of digits in base N where 2 =< N =< 36...
and which doesn't introduce a dependency between my program and a web

All this talk about prefixes, minus signs, and case is extraneous -
I daresay silly!  There are simply too many permutations.

If I care about a base-indicating prefix (or a suffix,) I'll add it

If I care about a minus sign (quick - name three times in the past when
you have had a pressing need for negative hexadecimal numbers,) I'll add
it myself (perhaps as a suffix - the guys in accounting prefer it that
way (on the days they don't prefer to it to be DB or CR instead.))

If I care about case, I'll throw the resulting string through
string:to_upper/1 or string:to_lower/1.

(Errr... you *are* going to add to_upper/1 and to_lower/1 to the string
module... right?  Or are those still going to be officially classified
as 'httpd helper functions'? :)

As far as I can see... in comparison... integer_to_list/2 would be
  * consistent
  * simple
  * useful

It's not wonderful that it'd be a BIF, but I can certainly live with it.


More information about the erlang-questions mailing list