> On Dec 6, 2017, at 5:46 PM, Letanyan Arumugam <letanya...@gmail.com> wrote:
> 
> But IUO’s are marked with an “!” to differentiate it from a normal type, 
> where as DynamicMemberLookup is just a normal protocol conformance. I would 
> be curious as to what you think of this idea [1]? Would this still be too 
> much of a constraint just to make sure that when people use this they’re 
> explicitly aware of what they’re doing?

I think that sort of approach seems like an acceptable middle ground. There's 
probably some bike-shedding to be done about the terminology and such. I just 
think it's overboard to require explicit annotations at the call site 
(especially for every single call site invocation). I would totally be fine 
with some sort of extra annotation at the declaration site beyond a normal 
protocol conformance. I do think this jibes well with C#'s `dynamic` approach 
from what I've gathered so far, and which other people seem to think is a 
worthy standard we should look toward for inspiration.

My main objection to many of the critical responses to the proposal is that the 
examples all seem to ignore where the variables that are being invoked come 
from. I think we all tend to have a pretty good idea of what types we're 
dealing with, and what their behaviors are. And when we run into issues, we 
inspect those types. If this makes it more apparent on inspection that it has 
some special behavior, then I'm all for that. It would be similar to inspecting 
a type that crashed which turned out to be an IUO.

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to