Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Michael S Newsgroups: comp.lang.c Subject: Re: Loops (was Re: do { quit; } else { }) Date: Tue, 15 Apr 2025 15:25:50 +0300 Organization: A noiseless patient Spider Lines: 49 Message-ID: <20250415152550.00007634@yahoo.com> References: <87a58mqt2o.fsf@nosuchdomain.example.com> <20250413072027.219@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Tue, 15 Apr 2025 14:25:53 +0200 (CEST) Injection-Info: dont-email.me; posting-host="5499b78c3538bab4e99dadb9a4c4fcee"; logging-data="3860244"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+8xQMuTXnPgMwJtjEng689T1bYO04gAIQ=" Cancel-Lock: sha1:KWMgfreGj63yjde1FlhaV0MoqZg= X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32) On Tue, 15 Apr 2025 11:15:06 +0100 bart wrote: > On 15/04/2025 05:57, Rosario19 wrote: > > On Mon, 14 Apr 2025 14:18:39 +0200, Janis Papanagnou wrote: > >> (While there's some "C" stuff in here it contains a lot of non-"C" > >> samples for comparison. So [OT]-sensible folks may want to skip > >> this post.) > >> > >> On 14.04.2025 12:16, bart wrote: > >>> On 14/04/2025 05:23, Janis Papanagnou wrote: > >>>> On 13.04.2025 18:39, bart wrote: > >>>>> [...] > >>>>> > >>>>> for(let i = 1; i <= 36; i++) { > > > > C for loop is great, but all can be workarounded with goto label > > For this specific example (ignore 'let' for C), please explain why it > is better than, say: > > FOR(i,1,36) { > > This is 99% of my for-loops. Is it the same reasoning why I have to > write 'break' in 99% of my switch-blocks? > > There's something about this group which celebrates these annoying > language characteristics which are only useful or meaningful in a > tiny minority of cases: see how wonderful it is for 1% of the time? > > That must surely justify them being both a PITA and dangerously error > prone in the vast majority of cases! I regularly use two languages with "proper loops" - Matlab/Octave and VHDL (Ada-like syntax). When writing loops in these languages, I don't feel any extra convenience over C. Nor do you suffer from reduced flexibility relatively to C, except very rarely. In other words, I don't care. And it's not because I can become accustomed to anything. E.g. I am using tcl for a long time. I never stopped hating most of its syntax, including for loops. I probably will care (i.e. dislike) language (or C macro) with the syntax shown in your last example, but less intensely than tcl.