[erlang-questions] atoms in iodata() / iolist()

Antonio SJ Musumeci trapexit@REDACTED
Mon May 25 18:59:06 CEST 2015

There are situations where atoms are mixed with strings such as filenames
and it'd be nice to not need to flatten and convert them. There are other
situations where knowing an atom would be converted to it's string form
would be more efficient and convenient than the alternative.
On May 25, 2015 12:44 PM, "Fred Hebert" <mononcqc@REDACTED> wrote:

> On 05/25, Antonio SJ Musumeci wrote:
>> Does anyone know of any backwards incompatibility which could arise if
>> atoms were added to the iodata() and iolist() definitions?
>> iolist() = maybe_improper_list(byte() | binary() | atom() | iolist(),
>> binary() | [])
>> iodata() = iolist() | atom() | binary()
> Why would you do that?
> But yes, there could be incompatibilities. For example, the `iodata()`
> type is defined in terms of `iolist()`, and operations such as
> `erlang:port_control()` return `iodata()` as a type. As such, operations to
> port programs could now technically start returning atoms to code that
> won't expect such things.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150525/9ffb5956/attachment.htm>

More information about the erlang-questions mailing list