<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I am designing APIs that need to support both reference (class/object) and value types. I am running into restrictions of `mutating` keyword in my protocols and this is causing a lot of duplication of code. In order to understand what I mean please take a look at this <a href="http://gist.github.com/hooman/2b74d9756976a43330c1acfcfba699f3" class="">gist</a>. </div><div class=""><br class=""></div><div class="">As you see, I have pairs of almost identical declarations: <b class="">KeyValueStore</b> vs <b class="">KeyValueStoreObject</b>, and <b class="">AnyDictionaryStore</b> vs <b class="">AnyDictionaryStoreObject</b>. This keeps rapidly growing as I am designing my APIs. Is there any sane way around this?</div><div class=""><br class=""></div><div class="">Thank you for your time,</div><div class="">Hooman</div></body></html>