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

Thomas Lindgren <>
Sun Mar 30 13:22:11 CEST 2003


Let me add that

 number_to_list/1
 list_to_number/1

would be useful (esp. the latter). Possibly also

 constant_to_list/1
 list_to_constant/1

Best,
Thomas

--- Raimo Niskanen <>
wrote:
> 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.
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com



More information about the erlang-questions mailing list