Greenwashing

Paul Backus snarwin at gmail.com
Fri May 29 13:20:52 UTC 2020


On Friday, 29 May 2020 at 12:40:45 UTC, Meta wrote:
> On Friday, 29 May 2020 at 08:52:14 UTC, Timon Gehr wrote:
>>> I find that response surprising, given that you used to use 
>>> Haskell (do you still?), which gets along fine without 
>>> exceptions.
>>
>> http://hackage.haskell.org/package/base-4.14.0.0/docs/Control-Exception.html
>>
>> Furthermore, imperative-style code in Haskell is based on 
>> monads, which are a generalization of exceptions.
>
> I'm going to step up the pedantry and say that this proves my 
> assertion; Haskell (the language) gets along fine without 
> exceptions, but they're there for you to use as a library, only 
> if you want to.

Forgoing exceptions in D would be a lot more palatable if we had 
something like C++'s [[nodiscard]] and Rust's #[must_use]. 
Currently, if you want to ensure that callers of your function 
can't ignore errors by accident, your only option in D is to 
throw an exception.


More information about the Digitalmars-d mailing list