C++ Logo

std-proposals

Advanced search

Re: [std-proposals] [Draft] Toward a more expressive grammar for exception qualifiers

From: Jan Schultke <janschultke_at_[hidden]>
Date: Mon, 1 Sep 2025 06:53:18 +0200
I'm not sure whether you're too late for April 1 or too early, but either
way, this is out-of-season.


On Sun, 31 Aug 2025 at 22:28, Jerome Saint-Martin via Std-Proposals <
std-proposals_at_[hidden]> wrote:

>
> C++ exception specifications are currently about as subtle as a
> sledgehammer. This proposal introduces a more emotionally nuanced approach
> to exception qualifiers — because sometimes, your function just needs to
> vent.
>
> *Motivation*
> In modern C++, exception specifications lack granularity.
> The binary choice between noexcept and potentially throwing functions
> fails to capture the nuanced reality of exception behavior.
>
> *Proposal Description*
> This proposal introduces a set of expressive qualifiers to reflect the
> emotional and probabilistic nature of exception handling:
> - throwmaybe : "I don't know, depends"
> - throwish : "Most of the time quiet"
> - nopexcept : "Trying not to throw"
> - ¯\\_(ツ)_/¯ : "Even the compiler is unsure"
> - maysometimethrowanexceptionifsomesortofconditionsarerealised : "All is
> in the exception name"
> - throweventuallymaybe : "One day, maybe…"
> - throwifyouinsist : "You asked for it"
> - throwbutonlyonTuesdays : "Seasonal behavior"
> - throwunlessyou’relucky : "It depends on internal state"
> - throwunlessnoexcept : "I exist in a paradox"
> - throwmaybe¯\\_(ツ)_/¯ : "I am Schrödinger’s function"
> Looking forward to your thoughts — or at least your raised eyebrows.
>
> Best regards,
> Jérôme Saint-Martin
>
> P.S. P.S. Caroline, Philippe, Flag — thanks for bearing witness to my
> brilliant brillance.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2025-09-01 04:53:33