Currently `Enum.join/2` is using `IO.iodata_to_binary/1` internally to join output string. My proposal there is to change that to use `:unicode.chardata_to_binary/1` instead, which will allow this function to conform to specs. Because currently if we have code like:
s = Enum.join([<<255>>, <<255>>])
It will output binary that is not string (`String.valid?(s) == false`). With `:unicode.chardata_to_binary/1` we could conform to the docs, but it would impose some performance hit, because of additional traverse to check if all binaries are properly UTF-8 encoded.
So before proposing PR with that change I wanted to consult there - what is more expected, correction of the specs (so it would accept any binary and will output binary) or it should be changed to check if the resulting binary is `String.t()`?
--
Łukasz Niemier
luk...@niemier.pl