Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c,comp.lang.c++ Subject: =?UTF-8?Q?Re=3a_=22=e2=80=9cRust_is_the_future_of_systems_programmi?= =?UTF-8?Q?ng=2c_C_is_the_new_Assembly=e2=80=9d=3a_Intel_principal_engineer?= =?UTF-8?Q?=2c_Josh_Triplett=22?= Date: Sat, 31 Aug 2019 12:18:45 +1200 Lines: 24 Message-ID: References: <086d2146-e2b8-4ec6-b8fd-f82c56f1aa16@googlegroups.com> <20190831030515.3e92d06f46e1fe46e5d4e7a8@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Ehv0WKPWmrM0toFjk5y4jAts+CQUJw5M9TbQwTeYgc94ihZ6hA Cancel-Lock: sha1:At9bvbZRKznZdnHbU/eQDphynjA= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 In-Reply-To: <20190831030515.3e92d06f46e1fe46e5d4e7a8@gmail.com> Content-Language: en-US Xref: csiph.com comp.lang.c:145884 comp.lang.c++:68051 On 31/08/2019 12:05, Anton Shepelev wrote: > Bonita Montero to already5chosen: > >>> EH is bad not because it's slow or costly, but because >>> of its messy semantics. >> >> What's messy with the semantics? > > By looking at any piece of contiguous code you can't say > where its execution is going to be suddenly interrupted and > jump to another unobvous place. Code with exceptions is not > local because its execution depends on any try blocks > anywhere up the call stack. Code with exceptions is not > transparent, because it hides the error-handling part of the > algorithm, and incomplete information is akin to a lie. You could equally say that code with exceptions emphasises the error handling be concentrating it in one place. Often a process with many steps either works or fails, so handling the errors in one place makes sense. Throwing exceptions also makes the error handling easier to spot, you just look for the throws. -- Ian.