<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=""><div><blockquote type="cite" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">You can already do something like this as well. Sure it's a bit verbose, but for the cases where you need to ignore the associated value you can do a one-to-one mapping. You can then simply do a<span class="Apple-converted-space"> </span></span><font face="monospace, monospace" style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">switch(enumVar.type()) { ... }.</font><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">enum EnumType {</font></div><div class=""><font face="monospace, monospace" class=""> </font></div><div class=""><font face="monospace, monospace" class=""> enum EnumTypeType {</font></div><div class=""><font face="monospace, monospace" class=""> case TypeA</font></div><div class=""><font face="monospace, monospace" class=""> case TypeB</font></div><div class=""><font face="monospace, monospace" class=""> case TypeC</font></div><div class=""><font face="monospace, monospace" class=""> case TypeD</font></div><div class=""><font face="monospace, monospace" class=""> }</font></div><div class=""><font face="monospace, monospace" class=""> </font></div><div class=""><font face="monospace, monospace" class=""> case TypeA(String)</font></div><div class=""><font face="monospace, monospace" class=""> case TypeB(Bool)</font></div><div class=""><font face="monospace, monospace" class=""> case TypeC()</font></div><div class=""><font face="monospace, monospace" class=""> case TypeD(String)</font></div><div class=""><font face="monospace, monospace" class=""> </font></div><div class=""><font face="monospace, monospace" class=""> func type() -> EnumTypeType {</font></div><div class=""><font face="monospace, monospace" class=""> switch(self) {</font></div><div class=""><font face="monospace, monospace" class=""> case .TypeA(_):</font></div><div class=""><font face="monospace, monospace" class=""> return .TypeA</font></div><div class=""><font face="monospace, monospace" class=""> case .TypeB(_):</font></div><div class=""><font face="monospace, monospace" class=""> return .TypeB</font></div><div class=""><font face="monospace, monospace" class=""> case .TypeC():</font></div><div class=""><font face="monospace, monospace" class=""> return .TypeC</font></div><div class=""><font face="monospace, monospace" class=""> case TypeD(_):</font></div><div class=""><font face="monospace, monospace" class=""> return .TypeD</font></div><div class=""><font face="monospace, monospace" class=""> }</font></div><div class=""><font face="monospace, monospace" class=""> }</font></div><div class=""><font face="monospace, monospace" class="">}</font></div></div></div></blockquote></div><br class=""></div><div class=""><br class=""></div><div class="">I initially considered this option too, but it doesn’t address the question:<div class=""></div></div><div class=""><br class=""><blockquote type="cite" class="">I'm talking about the ability to create a value that represents the generic concept of an enum case that has associated values, but without actually specifying any associated values.</blockquote><br class=""></div><div class="">The request was the ability to create enums without supplying the associated parameters, the above implementation doesn’t allow that (it’s simply not feasible). Also, it’s possible to pattern match an enum without binding it’s associated values, so there’s no need to create an internal ‘shadow’ enum without the parameters.</div><div class=""><br class=""></div><div class="">A very ugly approach would be to make the associated values Optionals, but that’s quite a hacky thing to do for the use case.</div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>