[erlang-questions] io:format/1+2 in OTP 21 doesn't take iodat() anymore

Adam Lindberg hello@REDACTED
Thu Jul 12 10:24:48 CEST 2018


Hi,

Haven’t found any information anywhere in the changelogs about this, but there seems to be a “regression” in the way io:format/1+2 works.

It used to be possible to call it with a mixed IO list of binaries and strings (iodata()), but this is no longer possible:

    14> io:format(["foo", "bar"]).
    foobarok
    15> io:format([<<"foo">>, "bar"]).
    ** exception error: bad argument
         in function  io:format/3
            called as io:format(<0.63.0>,[<<"foo">>,"bar"],[])

It seems it was never documented, as the format was always 'atom() | string() | binary()', but in practice 'iodata()' was allowed. Is this change intentional or is it a bug?

Cheers,
Adam

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180712/bba8e914/attachment.bin>


More information about the erlang-questions mailing list