[swift-evolution] [Pitch] Changing NSObject dispatch behavior

Dave Abrahams dabrahams at apple.com
Thu Dec 29 18:34:39 CST 2016

on Thu Dec 29 2016, Freak Show <swift-evolution at swift.org> wrote:

>> On Dec 29, 2016, at 13:28, Rod Brown via swift-evolution <swift-evolution at swift.org> wrote:
>> I’m in agreement that ‘dynamic’ is probably not what you want without a declaration.
> I hold a completely opposite viewpoint.  Dynamic is always what I want
> and table based is premature optimization.  Late binding is important.
> I found far too often when working in C++ (yes I am really flipping
> old) I would come across code where a developer hadn't chosen to make
> a method virtual and I found myself just up a creek with regards to
> extending that code.  Ditto people declaring stuff final in Java for
> no good reason.
> The important thing to consider is that the future is generally
> unknowable and if you don't know the future you cannot make good
> choices about what should and should not be dynamic.  So the
> conservative thing is to make everything dynamic until you cannot
> afford it - which...is usually never.

By that measure there should be no encapsulation; we should make
everything public, because somebody might need it someday.



More information about the swift-evolution mailing list