www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Feedback Thread: DIP 1029--Add throw as Function Attribute--Final

reply Mike Parker <aldacron gmail.com> writes:
This is the feedback thread for the Final Review of DIP 1029, 
"Add throw as Function Attribute".

===================================
**THIS IS NOT A DISCUSSION THREAD**

Posts in this thread must adhere to the feedback thread rules 
outlined in the Reviewer Guidelines (and listed at the bottom of 
this post).

https://github.com/dlang/DIPs/blob/master/docs/guidelines-reviewers.md

That document also provides guidelines on contributing feedback 
to a DIP review. Please read it before posting here. If you would 
like to discuss this DIP, please do so in the discussion thread:

https://forum.dlang.org/post/lyerouocavjvspqwvrmb forum.dlang.org

==================================

You can find DIP 1029 here:

https://github.com/dlang/DIPs/blob/9db80ddadcf5a220958ddcfec14b9c71cdb43d1c/DIPs/DIP1029.md

The review period will end at 11:59 PM ET on April 8, or when I 
make a post declaring it complete. Feedback posted to this thread 
after that point may be ignored.

At the end of the Final Review, the DIP will be forwarded to the 
language maintainers for Formal Assessment.

==================================
Posts in this thread that do not adhere to the following rules 
will be deleted at the DIP author's discretion:

* All posts must be a direct reply to the DIP manager's initial 
post, with only two exceptions:

     - Any commenter may reply to their own posts to retract 
feedback contained in the original post

     - The DIP author may (and is encouraged to) reply to any 
feedback solely to acknowledge the feedback with agreement or 
disagreement (preferably with supporting reasons in the latter 
case)

* Feedback must be actionable, i.e., there must be some action 
the DIP author can choose to take in response to the feedback, 
such as changing details, adding new information, or even 
retracting the proposal.

* Feedback related to the merits of the proposal rather than to 
the contents of the DIP (e.g., "I'm against this DIP.") is 
allowed in Community Review (not Final Review), but must be 
backed by supporting arguments (e.g., "I'm against this DIP 
because..."). The supporting arguments must be reasonable. 
Obviously frivolous arguments waste everyone's time.

* Feedback should be clear and concise, preferably listed as 
bullet points (those who take the time to do an in-depth review 
and provide feedback in the form of answers to the questions in 
this document will receive much gratitude). Information 
irrelevant to the DIP or is not provided in service of clarifying 
the feedback is unwelcome.
Apr 17 2020
next sibling parent reply Tove <tove fransson.se> writes:
On Friday, 17 April 2020 at 11:30:27 UTC, Mike Parker wrote:
 This is the feedback thread for the Final Review of DIP 1029, 
 "Add throw as Function Attribute".
 https://github.com/dlang/DIPs/blob/9db80ddadcf5a220958ddcfec14b9c71cdb43d1c/DIPs/DIP1029.md
I like it, but would prefer: throw!bool 1) makes meta-programming easier 2) would allow deprecating nothrow (in very long term) 3) there is precedence in C++ 'noexcept(expression)' (even if they made the wrong choice with using the negated specifier) Any arguments against?
Apr 17 2020
parent Walter Bright <newshound2 digitalmars.com> writes:
On 4/17/2020 6:03 AM, Tove wrote:
 I like it, but would prefer:
 throw!bool
 
 1) makes meta-programming easier
 2) would allow deprecating nothrow (in very long term)
 3) there is precedence in C++ 'noexcept(expression)'
 (even if they made the wrong choice with using the negated specifier)
 
 Any arguments against?
throw!bool implies it is throwing a bool. Besides, with throw/nothrow we already have the full functionality.
May 05 2020
prev sibling parent reply Steven Schveighoffer <schveiguy gmail.com> writes:
As mentioned by Dennis here: 
https://forum.dlang.org/post/fgszmctemzfkjniiibrx forum.dlang.org

throw should be added to StorageClass, otherwise there is an 
inconsistency between nothrow and throw.

-Steve
Apr 17 2020
parent Walter Bright <newshound2 digitalmars.com> writes:
On 4/17/2020 7:36 AM, Steven Schveighoffer wrote:
 As mentioned by Dennis here: 
 https://forum.dlang.org/post/fgszmctemzfkjniiibrx forum.dlang.org
 
 throw should be added to StorageClass, otherwise there is an inconsistency 
 between nothrow and throw.
You're right: https://dlang.org/spec/declaration.html#StorageClass
May 05 2020