[swift-evolution] TreeLiteralConvertible
Brent Royal-Gordon
brent at architechies.com
Thu Apr 14 16:44:50 CDT 2016
>> extension Tree: LiftingConvertible {
>> init(lifting value: Value) {
>> self = .leaf(value)
>> }
>> }
>
> Another name for this feature is "user-defined implicit conversions".
This is absolutely a form of user-defined implicit conversion. It's a limited form (one possible `Lifted` for each `LiftingConvertible`), which may help make it more feasible, and it is basically a generalization of the special-cased Optional lifting, but it is a user-defined implicit conversion.
I understand and agree with the reasons for deferring implicit conversions. What I'm saying is that seeing this as a "tree literals" feature is a very narrow view of the overall problem.
--
Brent Royal-Gordon
Architechies
More information about the swift-evolution
mailing list