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

Raimo Niskanen <>
Sun Mar 30 03:21:09 CEST 2003

I am about to add your requested functionality to io_lib:format, so I 
thought about adding these BIFs too, but it turned out that it was hard 
to decide what they should do, exactly: Erlang-style prefix or not, 
lowercase or UPPERCASE or selectable and how to select, how to select 
any-base for list_to_integer/2, etc.

It started to seem that an option list was needed with quite some 
options, and then they suddenly did seem too complicated to be BIFs.

So I hope it will do to use something like 
lists:flatten(io_lib:format("~16b", [Integer])).

If it is necessary for performance reasons, we might add these BIFs later.

/ Raimo Niskanen, Erlang/OTP

James Hague wrote:
> I've often thought Erlang should have the BIFs:
> 	integer_to_list(Base, Integer)
> 	list_to_integer(Base, List)
> In addition to the arity-1 versions that currently exist.

More information about the erlang-questions mailing list