<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><div><span style="background-color: rgba(255, 255, 255, 0);">Hi,</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">I too groan when faced with the lack of extensibility on enums. As a potential framework writer, I'd like to be able to use an enum as a key to dictionaries, supplying a minimum set of such enum cases, but allowing app developers to add new ones they require.&nbsp;</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">Having read the proposal however, I have a major concern and question the entire idea.&nbsp;</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">Given that there is unlikely to be a sane way to order the extended enum cases supplied by other modules, we will never be able to rely on the automatic ordinal values applied, nor their relative position in the natural sequence, for there isn't one outside of the first set of cases in the original definition.&nbsp;</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">For many cases this may be fine, on the understanding that everything would have to compile from source, but my understanding is that we don't want that in future with ABI around the corner. Binary libraries would probably need to bake in the value of e.g. Int enum cases. (I think?)</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">I fear that if this proposal were implemented without some major restrictions (such as never allowing use of rawValue), we would regret it and suffer for example having to explicitly set enum case Int raw values for every case in these enums in every module always, and suffer compilation errors when other (maybe binary) modules change their explicit raw values and clash with other modules. It could be a dependency nightmare.</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">Essentially consigning extensible enums to never being useful for serialising their raw values seems of limited use to me, as often you may not know you need them to have unmoving raw values until it is too late and your code is in the wild.&nbsp;</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">Perhaps I am missing some secret sauce?</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br>--</span><div><span style="background-color: rgba(255, 255, 255, 0);">Marc Palmer</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div></div><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"></span></font></blockquote></div></body></html>