Path: ...!eternal-september.org!feeder2.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: fir Newsgroups: comp.lang.c Subject: Re: else ladders practice Date: Mon, 04 Nov 2024 16:06:56 +0100 Organization: i2pn2 (i2pn.org) Message-ID: <6728E310.2060702@grunge.pl> References: <3deb64c5b0ee344acd9fbaea1002baf7302c1e8f@i2pn2.org> <78eabb4054783e30968ae5ffafd6b4ff2e5a5f17@i2pn2.org> <864j4pv76h.fsf@linuxsc.com> <6726C97C.4080807@grunge.pl> <86ldxztzpk.fsf@linuxsc.com> <6728E1F8.2090102@grunge.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: i2pn2.org; logging-data="920595"; mail-complaints-to="usenet@i2pn2.org"; posting-account="+ydHcGjgSeBt3Wz3WTfKefUptpAWaXduqfw5xdfsuS0"; User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24 To: Bart In-Reply-To: <6728E1F8.2090102@grunge.pl> X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 3170 Lines: 54 fir wrote: > Bart wrote: >> On 04/11/2024 04:00, Tim Rentsch wrote: >>> fir writes: >>> >>>> Tim Rentsch wrote: >> >>>>> With the understanding that I am offering more than my own opinion, >>>>> I can say that I might use any of the patterns mentioned, depending >>>>> on circumstances. I don't think any one approach is either always >>>>> right or always wrong. >>>> >>>> maybe, but some may heve some strong arguments (for use this and not >>>> that) i may overlook >>> >>> I acknowledge the point, but you haven't gotten any arguments, >>> only opinions. >> >> Pretty much everything about PL design is somebody's opinion. > > overally when you think and discuss such thing some conclusions may do > appear - and often soem do for me, though they are not always very clear > or 'hard' > > overally from this thread i noted that switch (which i already dont > liked) is bad.. note those two elements of switch it is "switch" > and "Case" are in weird not obvious relation in c (and what will it > work when you mix it etc) > > what i concluded was than if you do thing such way > > > a { } //this is analogon to case - named block > b { } //this is analogon to case - named block > n() // here by "()" i noted call of some wariable that mey yeild > 'call' to a ,b, c, d, e, f //(in that case na would be soem enum or > pointer) > c( ) //this is analogon to case - named block > d( ) //this is analogon to case - named block > > > then everything is clear - this call just selects and calls block , and > block itself are just definitions and are skipped in execution until > "called" > > > this is example of some conclusion for me from thsi thread - and i think > such codes as this my own initial example should be probably done such > way (though it is not c, i know > > note in fact both array usage like tab[5] and fuunction call like foo() are analogues to swich case - as when you call fuctions the call is like switch and function definition sets are 'cases'