From mboxrd@z Thu Jan 1 00:00:00 1970 From: steffen at sdaoden.eu (Steffen Nurpmeso) Date: Tue, 01 Dec 2020 23:38:24 +0100 Subject: [COFF] [TUHS] The UNIX Command Language (1976) In-Reply-To: References: <15511090.6330.1606835354160.JavaMail.root@zimbraanteil> <202012011538.0B1FcLi5023858@freefriends.org> <202012011639.0B1GdjcD031722@freefriends.org> <20201201202012.-40Ur%steffen@sdaoden.eu> <67EE6390-7E60-442B-AEEA-17951ED759A5@iitbombay.org> Message-ID: <20201201223824.gBVRZ%steffen@sdaoden.eu> Dan Cross wrote in : |On Tue, Dec 1, 2020 at 3:40 PM Bakul Shah wrote: | |> On Dec 1, 2020, at 12:20 PM, Steffen Nurpmeso 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)