> 5 Dec. 2017 01:08 Benjamin G via swift-evolution <swift-evolution@swift.org> 
> wrote:
> Unless DynamicLookup is used to circumvent every compiler warning or errors 
> thrown at you by the language because your design is unsound. Something like 
> "ho, yeah swift generics and protocols aren't really working fine together 
> for your case, but just make everything DynamicLookupable and you'll be all 
> set". Or "This JSON document has a really complex schema. Let's just not 
> specify anything, and call the fields like this, you won't even feel any 
> difference anyway".

We have heard these horror tales about everyone making "everything 
DynamicLookupable" and this being extremely bad, but can anyone actually 
produce a believable example? It's not like it's absurdly convenient to 
implement this, the ergonomics are at the call site, not the implementation. It 
sounds like you think that just conforming to DynamicMemberLookupProtocol and 
DynamicCallable will magically make everything in the code dynamic with no 
extra effort.


swift-evolution mailing list

Reply via email to