DIP 1029---Add throw as Function Attribute---Community Review Round 1

user1234 user1234 at 1234.de
Wed Jan 22 23:06:11 UTC 2020

On Wednesday, 22 January 2020 at 22:47:51 UTC, user1234 wrote:
> On Tuesday, 14 January 2020 at 10:44:17 UTC, Mike Parker wrote:
>> [...]
> Impossible without cleaning a bit the attributes before. 
> instead of adding a new keyword we should make all the function 
> attributes '@' attributes, and deprecate 'nothrow' as a keyword 
> and encourage @nothrow instead.
> This DIP encourages the bizarre situation where function 
> attributes can be '@' attribs or keywords.

in my opinion something like

     void foo() @safe @nogc pure nothrow {}

should become

     void foo() @safe @nogc @pure @nothrow {}

so "throw" as a function attribute is just a big no.
This will create a debt in case attribs syntax got normalized one 

More information about the Digitalmars-d mailing list