[haiku-development] Re: Plan for NetServices Kit (v2)

  • From: Ryan Leavengood <leavengood@xxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Thu, 2 Sep 2021 10:39:32 -0400

On Thu, Sep 2, 2021 at 10:08 AM Adrien Destugues
<pulkomandy@xxxxxxxxxxxxx> wrote:


More generally, I'm not sure the argument of authority is valid here.
Each of these languages was designed for a specific context, which is not
ours.

I wasn't necessarily using that list of languages as an argument of
authority as much as "this seems to be what some aspects of the
industry are moving toward". As Niels mentions Rust has panics, as
does Go, which are pretty close to exceptions. Nim also has exceptions
and it kind of fits into the "newer low-level language" group. I
wasn't cherry-picking to say that nothing uses exceptions but that a
decent group of well-regarded languages don't have exceptions.

Of course C++ has exceptions and you will run into them quite often,
so it is what it is.

My main issue with exceptions in any language is the code not
communicating when they can occur. This relies on good documentation.
Haiku can probably solve that problem. If exceptions can provide
better error messages and a trace of the code flow then that is better
than the status quo (no pun intended) where one bad if statement can
hide the true error code with status_t errors.

-- 
Regards,
Ryan

Other related posts: