C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: [important] C++ Zero-Overhead exception proposal
From: Denis Kotov (redradist_at_[hidden])
Date: 2020-10-12 15:59:56


Hi all,

I would like to discuss Zero-Overhead proposal, I would like if Herb Sutter
will participate

>>
I was so exited when I first saw your video with Zero-Overhead exception
proposal that this proposal stuck in my head and I thought about it while
to while ...

Today I decided that to wrote some my thought about it:
 I little bit disagree the we need to return std::error instead of
exception because it is possible to make Zero-Overhead exceptions without
changing the way of checking exceptions

How can we achieve it ... ?
Easy, we just need to implicitly to add to signature of the function the
list of exceptions that it throw ...
Wow, wow, wow ... I hear from you, but it was the previous solution with
dynamic exception ...
Not exactly, consider the example:
void func throws {
  throw WeirdException("Some Weird Exception");
}

it will translates at compilation time to this:
void func throws(WeirdException)

It will be done by compiler without user interaction ... It will allow on
caller side (for compiler) to know exactly which exceptions function throw,
and compiler would be able to generate code something like in the example
of GodBolt (see below)

Link to GodBlot:
https://godbolt.org/z/a_vbNw

Thank you for your time !!

On Mon, 12 Oct 2020 at 21:10, Lisa Wells <admin_at_[hidden]> wrote:

> Hi Denis,
>
> This email address is for website administration only. Please direct
> questions about C++ to StackOverflow C++
> <https://stackoverflow.com/questions/tagged/c%2b%2b> and direct questions
> about the standard to the public std-discussion mailing list
> <https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion>*.* For ISO
> questions, you can also try https://www.iso.org/.
>
> Best of luck,
>
> Lisa Wells
> Assistant to Herb Sutter
> Standard C++ Foundation / CppCon
>
>
> On Mon, Oct 12, 2020 at 3:58 AM Denis Kotov <redradist_at_[hidden]> wrote:
>
>> Hi Herb,
>>
>> I hope you will see this email this time )
>>
>> Have you seen my suggestion for improvement for C++ Zero-Overhead
>> exception proposal ?
>>
>> It was in the first email
>>
>> >>
>> I was so exited when I first saw your video with Zero-Overhead exception
>> proposal that this proposal stuck in my head and I thought about it while
>> to while ...
>>
>> Today I decided that to wrote some my thought about it:
>> I little bit disagree the we need to return std::error instead of
>> exception because it is possible to make Zero-Overhead exceptions without
>> changing the way of checking exceptions
>>
>> How can we achieve it ... ?
>> Easy, we just need to implicitly to add to signature of the function the
>> list of exceptions that it throw ...
>> Wow, wow, wow ... I hear from you, but it was the previous solution with
>> dynamic exception ...
>> Not exactly, consider the example:
>> void func throws {
>> throw WeirdException("Some Weird Exception");
>> }
>>
>> it will translates at compilation time to this:
>> void func throws(WeirdException)
>>
>> It will be done by compiler without user interaction ... It will allow on
>> caller side (for compiler) to know exactly which exceptions function throw,
>> and compiler would be able to generate code something like in the example
>> of GodBolt (see below)
>>
>> Link to GodBlot:
>> https://godbolt.org/z/a_vbNw
>>
>> Thank you for your time !!
>>
>> On Sun, 12 Apr 2020 at 13:53, Denis Kotov <redradist_at_[hidden]> wrote:
>>
>>> Hi
>>>
>>> On Mon, 23 Sep 2019 at 13:36, Denis Kotov <redradist_at_[hidden]> wrote:
>>>
>>>> Hi Herbert,
>>>>
>>>> Kindly reminder ;)
>>>>
>>>> On Tue, 16 Jul 2019 at 22:52, Denis Kotov <redradist_at_[hidden]> wrote:
>>>>
>>>>> Hi Herb,
>>>>> Have seen my previous emails regarding Thread Safe Exceptions ?
>>>>>
>>>>> On Mon, 3 Jun 2019 at 10:08, Denis Kotov <redradist_at_[hidden]> wrote:
>>>>>
>>>>>> On Thu, 30 May 2019 at 10:48, Denis Kotov <redradist_at_[hidden]>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Herb,
>>>>>>>
>>>>>>> I was so exited when I first saw your video with Zero-Overhead
>>>>>>> exception proposal that this proposal stuck in my head and I thought about
>>>>>>> it while to while ...
>>>>>>>
>>>>>>> Today I decided that to wrote some my thought about it:
>>>>>>> I little bit disagree the we need to return std::error instead of
>>>>>>> exception because it is possible to make Zero-Overhead exceptions without
>>>>>>> changing the way of checking exceptions
>>>>>>>
>>>>>>> How can we achieve it ... ?
>>>>>>> Easy, we just need to implicitly to add to signature of the function
>>>>>>> the list of exceptions that it throw ...
>>>>>>> Wow, wow, wow ... I hear from you, but it was the previous solution
>>>>>>> with dynamic exception ...
>>>>>>> Not exactly, consider the example:
>>>>>>> void func throws {
>>>>>>> throw WeirdException("Some Weird Exception");
>>>>>>> }
>>>>>>>
>>>>>>> it will translates at compilation time to this:
>>>>>>> void func throws(WeirdException)
>>>>>>>
>>>>>>> It will be done by compiler without user interaction ... It will
>>>>>>> allow on caller side (for compiler) to know exactly which exceptions
>>>>>>> function throw, and compiler would be able to generate code something like
>>>>>>> in the example of GodBolt (see below)
>>>>>>>
>>>>>>> Link to GodBlot:
>>>>>>> https://godbolt.org/z/a_vbNw
>>>>>>>
>>>>>>> *Thanks,*
>>>>>>>
>>>>>>> *Best RegardsDenis Kotov*
>>>>>>>
>>>>>>
>>>>>> Hi Herb,
>>>>>>
>>>>>> Have you seen my thoughts ?
>>>>>> What do you think ?
>>>>>>
>>>>>>
>>>>>> *Kindly ReminderDenis Kotov*
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> *Best RegardsDenis Kotov*
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Best RegardsDenis Kotov*
>>>>
>>>
>>> Hi Herb,
>>>
>>> Have you seen my suggestion for improvement for C++ Zero-Overhead
>>> exception proposal ?
>>>
>>> It was in the first email
>>>
>>> >>
>>> I was so exited when I first saw your video with Zero-Overhead exception
>>> proposal that this proposal stuck in my head and I thought about it while
>>> to while ...
>>>
>>> Today I decided that to wrote some my thought about it:
>>> I little bit disagree the we need to return std::error instead of
>>> exception because it is possible to make Zero-Overhead exceptions without
>>> changing the way of checking exceptions
>>>
>>> How can we achieve it ... ?
>>> Easy, we just need to implicitly to add to signature of the function the
>>> list of exceptions that it throw ...
>>> Wow, wow, wow ... I hear from you, but it was the previous solution with
>>> dynamic exception ...
>>> Not exactly, consider the example:
>>> void func throws {
>>> throw WeirdException("Some Weird Exception");
>>> }
>>>
>>> it will translates at compilation time to this:
>>> void func throws(WeirdException)
>>>
>>> It will be done by compiler without user interaction ... It will allow
>>> on caller side (for compiler) to know exactly which exceptions function
>>> throw, and compiler would be able to generate code something like in the
>>> example of GodBolt (see below)
>>>
>>> Link to GodBlot:
>>> https://godbolt.org/z/a_vbNw
>>>
>>> Thank you for your time !!
>>>
>>> *Thanks,*
>>>
>>> *Best RegardsDenis Kotov*
>>>
>>
>>
>> --
>>
>> *Best RegardsDenis Kotov*
>>
>

-- 
*Best RegardsDenis Kotov*


STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups