The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Ralph Corderoy <ralph@inputplus.co.uk>
To: tuhs@tuhs.org
Subject: [TUHS] Conditions, AKA exceptions.  (Was: I can't drive 55: "GOTO considered harmful" 55th anniversary)
Date: Fri, 10 Mar 2023 11:51:45 +0000	[thread overview]
Message-ID: <20230310115145.84A89212A8@orac.inputplus.co.uk> (raw)
In-Reply-To: <20230310113708.AD55518C080@mercury.lcs.mit.edu>

Hi Noel,

> > In C I use it all the time to do goto err for common error recovery
> > because C doesn't have anything better.
>
> That's because C doesn't have 'conditions'. (Apparently, from the following
> posts, most people here are unfamiliar with them. Too bad, they are a great
> idea. OK summary here:
>
>   http://gunkies.org/wiki/Condition_handler

I wasn't familiar with the term ‘condition handler’.  That page starts

   ‘A condition handler (sometimes exception handler) refers to a
    mechanism in some programming languages which allows the programmer
    to provide code to handle the occurrence of a exception or condition
    (terminology varies, but the substance does not).’

Oh, exceptions.  I know what they are and if you say above that most
people are unfamiliar with them due to their use of goto then that's
probably wrong.

There are good reasons languages like Go chose not to include them.
https://go.dev/doc/faq#exceptions

-- 
Cheers, Ralph.

  reply	other threads:[~2023-03-10 11:52 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 11:37 [TUHS] Re: I can't drive 55: "GOTO considered harmful" 55th anniversary Noel Chiappa
2023-03-10 11:51 ` Ralph Corderoy [this message]
2023-03-10 15:54 ` Dan Cross
2023-03-12  7:39   ` Anthony Martin
2023-03-12 11:40     ` Dan Cross
2023-03-12 16:40       ` Paul Winalski
2023-03-13  3:25       ` John Cowan
2023-03-13 10:40         ` Alejandro Colomar (man-pages)
2023-03-13 12:19           ` Dan Cross
2023-03-13 12:43             ` [TUHS] [TUHS]: C dialects (was: I can't drive 55: "GOTO considered harmful" 55th anniversary) Alejandro Colomar
2023-03-13 12:46               ` [TUHS] " Dan Cross
2023-03-13 16:00               ` Paul Winalski
2023-03-13 19:00                 ` Clem Cole
2023-03-13 19:09                   ` Larry McVoy
2023-03-13 19:17                   ` Steve Nickolas
2023-03-13 20:26                     ` Dan Cross
2023-03-13 22:25                       ` Alejandro Colomar (man-pages)
2023-03-13 19:24                   ` [TUHS] Re: [TUHS]: C dialects Luther Johnson
2023-03-13 19:38                     ` Luther Johnson
2023-03-14 19:48                     ` John Cowan
2023-03-14 19:56                       ` Joseph Holsten
2023-03-14 20:01                       ` Luther Johnson
2023-03-13 20:48                   ` [TUHS] Re: [TUHS]: C dialects (was: I can't drive 55: "GOTO considered harmful" 55th anniversary) Paul Winalski
2023-03-13 20:56                     ` Bakul Shah
2023-03-14  1:06                     ` Larry McVoy
2023-03-13 21:00                   ` Paul Winalski
2023-03-13 21:07                     ` Bakul Shah
2023-03-13 21:14                       ` Dan Cross
2023-03-13 22:15                         ` Dave Horsfall
2023-03-13 22:47                           ` Dave Horsfall
2023-03-14  0:23                             ` Dan Cross
2023-03-14  0:21                           ` Dan Cross
2023-03-14 13:52                             ` Chet Ramey
2023-03-14  1:27                         ` Bakul Shah
2023-03-13 21:28                       ` Paul Winalski
2023-03-14 10:04                       ` [TUHS] C dialects Ralph Corderoy
2023-03-14 20:02                         ` [TUHS] " John Cowan
2023-03-14 21:34                           ` Thomas Paulsen
2023-03-14  0:38                     ` [TUHS] Re: [TUHS]: C dialects (was: I can't drive 55: "GOTO considered harmful" 55th anniversary) John Cowan
2023-03-14  2:49                 ` Theodore Ts'o
2023-03-14  3:06                   ` G. Branden Robinson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230310115145.84A89212A8@orac.inputplus.co.uk \
    --to=ralph@inputplus.co.uk \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).