* [COFF] [TUHS] The UNIX Command Language (1976)
[not found] ` <CAEoi9W63J0HKbWUk8wrGSkCdyzzaV-F6km-q+K-H2+kvURWWdQ@mail.gmail.com>
@ 2020-12-01 22:38 ` steffen
2020-12-01 23:06 ` steffen
0 siblings, 1 reply; 2+ messages in thread
From: steffen @ 2020-12-01 22:38 UTC (permalink / raw)
Dan Cross wrote in
<CAEoi9W63J0HKbWUk8wrGSkCdyzzaV-F6km-q+K-H2+kvURWWdQ at mail.gmail.com>:
|On Tue, Dec 1, 2020 at 3:40 PM Bakul Shah <bakul at iitbombay.org> wrote:
|
|> On Dec 1, 2020, at 12:20 PM, Steffen Nurpmeso <steffen at sdaoden.eu> wrote:
|>> Never without my goto:, and if it is only to break to error
|>> handling and/or staged destruction of local variables after
|>> initialization failures. Traumatic school impression, finding
|>> yourself locked in some PASCAL if condition, and no way to go to.
|>
|> Pascal had goto.
Hm, i did not receive Bakul's mail. Well i did not use it long
enough. I think this came up in the past already, it could have
been it was a mutilated version, there definetely was no goto in
this DOS-looking UI with menu bar, with menu entries for
compilation plus, help screen etc etc. Borland Pascal, Borland
dBASE it must have been then. Didn't i say "maybe the teacher had
an option to turn it on" or something :) Yeah, i do not know, but
there was no goto, definetely.
|Pascal also had to go. (Thanks...I'm here all week.)
Ah, and all the many-page program listings in Delphi, what a waste
of paper. Whether anyone really typed them out, not me.
|You can even do a non-local goto!
Help.
|> In Go you don't need goto for the sort of thing you and McVoy
|> talked about due to its defer statement and GC. Now granted
|> GC may be too big of a hammer for C/C++ but a future C/C++
|> add defer gainfully as the defer pattern is pretty common.
|> For example, mutex lock and unlock.
Terrible just as pthread_cleanup_push/pop, and that can be
entirely local-to-scope. Terrible even if there would be
"closure"s that could be used as arguments instead of a function
pointer. gcc supports/ed computed goto's, which would also be
nice in that respect. And some kind of ISO _Xy() which could be
used in conditionals dependent on whether the argument is
a computed goto, a "closure" or a function pointer (or a member
function pointer).
I always hated that C++ is not ISO C plus extensions, so your
"C/C++" is not true for a long time...
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
^ permalink raw reply [flat|nested] 2+ messages in thread