<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>On Mon, Dec 7, 2015, at 02:18 PM, ilya wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div><div><div> </div>
<blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex;"><div>
I wouldn't mind seeing something like the `dynamic` keyword to allow<br></div>
<div>
concrete types to override these protocol extension methods (although<br></div>
</blockquote><div> </div>
<div>You currently allow it by declaring method to be part of protocol, which means that an entry for some method is reserved in the protocol witness table. This entry will be filled either by concrete method, if present, or by protocol default implementation.<br></div>
</div>
</div>
</div>
</blockquote><div> </div>
<div>Sure, if you define the protocol yourself, and you want the method to be available for all instances of the protocol. My `dynamic` suggestion is meant to cover the cases of a) you didn't define the protocol yourself, but you want to define a method that can be overridden by any class that can see your protocol extension, or b) you want to define the method only for a subset of protocol implementations (e.g. with a `where` clause) but still want to allow for overriding.<br></div>
<div> </div>
<div>That said, I think `dynamic` is the wrong keyword here, because it means runtime dynamic dispatch, and what I'm really talking about is just the ability to have a separate protocol witness table for the extension.<br></div>
<div> </div>
<div>-Kevin Ballard</div>
</body>
</html>