Greenwashing

Paolo Invernizzi paolo.invernizzi at gmail.com
Thu May 28 15:48:44 UTC 2020


On Thursday, 28 May 2020 at 15:28:02 UTC, Steven Schveighoffer 
wrote:
> On 5/28/20 11:16 AM, Paolo Invernizzi wrote:
>> [...]
>
> I should be clearer that MY motivation for having these things 
> be the default is so that more code can be used in more 
> situations. Walter's motivation may differ.
>
> The fact that this function is not @nogc @safe pure nothrow is 
> a failure of the language:
>
> int multiply(int x, int y) { return x * y; }
>
> I shouldn't have to have attribute soup everywhere, and most 
> likely I'm not going to bother.
>
> The motivation for the existence of nothrow in general is to 
> avoid the cost of exception handling.
>
> But the motivation of making it the *default* is because people 
> just don't mark their nothrow functions nothrow. The easier 
> default is nothrow because it is callable from either situation.
>
> In other words, it enables more code.
>
> -Steve

I can agree with you, but I would like to see a solid rationale 
for that kind of switches.
But I guess that we should only wait till the discussion on the 
future DIP around that.



More information about the Digitalmars-d mailing list