Hi, Marc Weber wrote:
>> Another concern is that it catches all exceptions. Compare this with >> what other languages typically provide, where only exceptions of the >> specified type are caught (it's also usually possible to catch >> exceptions of any type, e.g., by specifying `Exception' as the exception >> type in Java, but that has to be made explicit.) > > We don't have types.. Are you thinking about > catchString catchAttrs catchNull catchList ? You could throw a value, and rethrow it if you can't handle it. However, having distinct kinds of exceptions is a problem in a purely functional language, since the exception that gets thrown might depend on the evaluation order. This is why Haskell only allows exceptions to be caught in the I/O monad. -- Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/ _______________________________________________ nix-dev mailing list [email protected] https://mail.cs.uu.nl/mailman/listinfo/nix-dev
