> It would be nice for Swift to support Tcl-like exceptional return codes so we 
> can build control flow functions that work with break, continue, and return 
> properly.

Wouldn't that collide in some way with the error handling mechanism already 
present in swift ?
Today, you can return a value, possibly optional to return nil if the method 
might not be able to find the requested value, or to compute it, or you can 
throw errors for invalid situations. You can then fine tune your errors, to 
denote an error case (hopefully with some details), a break case, ...

Uniform and coherent error handling is not easy to achieve, I fear that adding 
another way to report and handle them would not help in that regard.

Jerome

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to