6 ms·
Not mandate them , use have them as an options where the monadic Errors types are not enough or are too cumbersome to use.
by soulbadguy 10y ago
Not mandate them , use have them as an options where the monadic Errors types are not enough or are too cumbersome to use.
- pcwalton 10y agoAnd thereby prevent people from writing code that needs to catch errors but can't use exceptions. Won't work.
- soulbadguy 10y agoI don't understand what that sentence means...
- thristian 10y agoSome people don't want to use exceptions because of runtime overhead costs. If exceptions are just "an option" that a library can choose when designing its interface, then you'll get a split ecosystem: a bunch of libraries that do use exceptions for error-handling, and then a separate bunch of libraries that do the same thing, but don't use exceptions for error handling, which is wasted, redundant effort.
- btschaegg 10y ago> then you'll get a split ecosystem Agreed. Point in case: Have a look at D and the discussions about their GC. I haven't kept up much about the last year, but my general impression runs down to: If you want to use their standard library. There's gonna be garbage collection. Period. If you want to avoid it, enjoy implementing its functionality all by yourself. With rust and exceptions you would likely not have a problem with the main ecosystem, but the same problem is bound to pop up with some big & famous library. Edit: Similarly, exceptions are one of the reasons C++'s SG14 exists.
- deleted 10y ago[deleted]