[erlang-questions] list_to_binary vs iolist_to_binary

Adam Lindberg <>
Tue Jul 8 08:52:16 CEST 2008


Well, an IO list can basically be any mix of lists (deep) and
binaries, and thus only one binary in one of its simpler forms. I
suppose it is for convenience purposes so that you don't have to know
whether your IO list is only a binary or a deeper list.

Cheers!
Adam
--
Adam Lindberg
http://www.erlang-consulting.com

On Tue, Jul 8, 2008 at 00:08, db <> wrote:
> I have a sql query as a list and need to convert it to binary.  Both
> function seems to take iolist as an argument and returns a binary()
> type.  Only difference I see is that iolist_to_binary also takes in
> binary as an argument.  Is that the only different?
>
> --
> rk
>
> That which we persist in doing becomes easier for us to do; not that
> the nature of the thing itself is changed, but that our power to do is
> increased.
> -Ralph Waldo Emerson
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list