On Mon, Oct 15, 2012 at 11:38 AM, Kevin Wright <[email protected]> wrote: > So what's the type of throw new Exception(...)? > It HAS to be a subclass of int, or the definition of retval is invalid.
Or.... it threw an exception. We are already hitting a keyword here. Not exactly a tough one to conceive and we are already outside of the types as expressed in the method signature. Why bother letting that detail leak to the users? That is, people are comfortable with "this method returns an int, or throws an exception, or exits the system." Why try and force people to understand that "throws an exception and exits the system" can be made compatible with "returns an int" through the type system? -- You received this message because you are subscribed to the Google Groups "Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
