@Alejandro_Martinez correct, DictionaryLiteral
is a public type in the swift standard library and as such, it can be used by types defined in the stdlib
and other frameworks, like Foundation
.
It definitely has a very confusing name, as most people assume, like you, that it is related with dictionary literals in the code. But it is not, it just has a bad name. There is a pretty long thread intended to give it a better name (eg.KeyValueList
or KeyValueArray
): 100% bikeshed topic: DictionaryLiteral. Here is the proposal: SE-0214 - Renaming the DictionaryLiteral type to KeyValueList