<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Do we already have a proposal for expanding constraints to support categories beyond class? I am guessing this might have ABI stability concerns, or at least library resilience concerns.</div><div class=""><br class=""></div><div class="">If so and no one else has tackled it I’m happy to write up a proposal. There are only a couple that I know of:</div><div class=""><br class=""></div><div class=""><b class="">valuetype</b></div><div class="">Only struct and enum types would satisfy this constraint.</div><div class=""><br class=""></div><div class=""><b class="">valuetype(pure)</b></div><div class="">A struct or enum that contain no reference types at all. The only reason to add this would be allowing certain optimizations, though the way existentials work today I’m not sure if this is even possible because the calls to value witnesses need to be emitted anyway.</div><div class=""><br class=""></div><div class=""><b class="">functiontype</b></div><div class="">A function type. This doesn’t have much use today but eventually we could expand this to support reflecting the number and type of arguments, dynamically invoking, etc.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">If there aren’t any ABI or resilience concerns then we can shelve it. I created <a href="https://bugs.swift.org/browse/SR-3056" class="">https://bugs.swift.org/browse/SR-3056</a> to track the idea in either case.</div><div class=""><br class=""></div><div class="">Russ</div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>