-
Notifications
You must be signed in to change notification settings - Fork 373
Description
Users find it confusing that strings are iterable, see https://discourse.julialang.org/t/flatten-in-case-column-contains-string-and-array/61284/5. They are not iterable in broadcasting. On the other hand we should not follow the full semantics of Base.broadcastable as it will then eg. disallow Dicts (this was the original reason why I went for iterator interface).
I think the way to go is to create a list of special cases. Here is a collection of standard "suspects that I think we should not flatten by default:
AbstractStringPairMarkdown.MD
the question is if we want them to be left "as is" or throw an error. If we leave them "as is" then probably we should also consider what other types we want to leave "as is" (they currently error):
SymbolMissingNothing
(I have listed only the most common cases)
The general question in the first place is: do we find it useful to complicate the API of flatten. My fist instinct is to throw an error on the cases we do not want to allow being flattened as this will be simpler.