[erlang-questions] io:format question

Imants Cekusins imantc@REDACTED
Tue Feb 3 17:26:45 CET 2015


isn't it

io:format(Format).
or
io:format(Format, Data).

where Format:: format() = atom() | string() | binary()

?

it is a bit surprising to see [string()|binary()] accepted for Format
in io:format/1.

btw [atom()] fails


On 3 February 2015 at 16:52, e@REDACTED <e@REDACTED> wrote:
> On 02/03/2015 04:49 PM, Daniil Churikov wrote:
>>
>> Does anybody know why `Format' param of `io:format' and friends disallows
>> `iodata'?
>
>
> allow me to guess:
> because
> iodata flattening while during output is a side effect of the output
> mechanisms
> .
> using iodata as "format" argument will require real flattening anyway,
> rendering its useless.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list