Has there been any discussion of REQUIRING names for associated types in an 
enum?

e.g.,
  Current            =   “case error (String, Int)”                             
                // No names
  Proposed   =    “case error (errorString: String, errorCode: Int)”            
// Has names

I know that Swift allows this today — optionally.  To me, it seems that 
requiring the parameter names would be more consistent with func syntax.  The 
current syntax (defaulting to no names) leads to declaration of vars that look 
C-like, to me:

let myResult = Result.error (“It failed”, -999)


_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to