<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi SE,<div class=""><br class=""></div><div class="">I’m pondering some esoteric type stuff as I’m sketching out an improved date/time library (<a href="https://github.com/davedelong/Chronology" class="">https://github.com/davedelong/Chronology</a>), and I’m wondering two things:</div><div class=""><br class=""></div><div class="">1️⃣ Is there a way to express a type that does *not* conform to a protocol?&nbsp;</div><div class=""><br class=""></div><div class="">For example, let’s say I have three protocols:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">protocol YearHaving { var year: Int }</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">protocol MonthHaving { var month: Int }</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">protocol DayHaving { var day: Int }</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">typealias DateHaving = YearHaving &amp; MonthHaving &amp; DayHaving</span></font></div><div class=""><br class=""></div><div class="">Now, I want to allow for some adjustments to values that have these types:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">extension DayHaving {</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp; &nbsp; func removingDay() → Self &amp;&nbsp;¬DayHaving // whatever type&nbsp;“self” is, except it does not conform to&nbsp;“DayHaving”, because you just removed the day value</span></font></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">}</span></font></div><div class=""><br class=""></div><div class="">Is this possible?</div><div class=""><br class=""></div><div class="">2️⃣ If this is not possible, would it be hard to add something like this in?</div><div class=""><br class=""></div><div class="">Dave</div></body></html>