At this point I just scoring poor sides of swift.
As you all know, swift allows to express (to some extent) types as value, which are called metatypes (ex
String.self etc). But the thing is, you cannot do anything with it:
let type = String.self let anotherType = Optional<type>.self //error: use of undeclared type 'type'
Nither you can partially specialize them.
var type = Dictionary<String, _>.self type.Value = Bool.random() ? String.self : Int.self type.init(...)
So what do you all do with them, if anything?
By the way, if types as values facility is to be expanded, should this mean that there should also be values as types?
typealias Zero<N: Numeric> = N.init(exactly: 0) would be nice to have.