Deutsch English Français Italiano |
<vud87h$1fups$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: bart <bc@freeuk.com> Newsgroups: comp.lang.c Subject: Re: Loops (was Re: do { quit; } else { }) Date: Thu, 24 Apr 2025 12:44:48 +0100 Organization: A noiseless patient Spider Lines: 53 Message-ID: <vud87h$1fups$1@dont-email.me> References: <vspbjh$8dvd$1@dont-email.me> <vu01k7$1bfv2$1@dont-email.me> <vu0720$1dva7$1@dont-email.me> <vu2hmg$3jn88$1@dont-email.me> <vu2mkc$3noft$1@dont-email.me> <vu38da$735n$1@dont-email.me> <vu3j7s$g755$1@dont-email.me> <87ecxmv4t4.fsf@nosuchdomain.example.com> <vu401g$reom$1@dont-email.me> <20250420200823.908@kylheku.com> <vu5bqp$230jl$2@dont-email.me> <20250421113640.839@kylheku.com> <vu67up$2ubvr$1@dont-email.me> <20250421125957.29@kylheku.com> <vu6kkt$392e6$1@dont-email.me> <vu6q3b$3jhq1$1@paganini.bofh.team> <vu7r19$da0o$1@dont-email.me> <20250422103555.547@kylheku.com> <vu8sm8$18fhc$2@dont-email.me> <vub14h$3d9kt$1@dont-email.me> <vub8rh$3kfla$1@dont-email.me> <20250423113224.711@kylheku.com> <vucpu4$1418h$1@dont-email.me> <vucsjf$159um$1@dont-email.me> <vud55j$1e28s$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 24 Apr 2025 13:44:50 +0200 (CEST) Injection-Info: dont-email.me; posting-host="a15eea173108e872714458e11e12d2b4"; logging-data="1571644"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19fxac0I+m+oD4DN/9Q9+1D" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:HLM2SvrSlnrO59PuP5FfjCtl9Qc= In-Reply-To: <vud55j$1e28s$1@dont-email.me> Content-Language: en-GB Bytes: 3736 On 24/04/2025 11:52, Muttley@DastardlyHQ.org wrote: > On Thu, 24 Apr 2025 09:26:23 +0100 > bart <bc@freeuk.com> wibbled: >> On 24/04/2025 08:40, Muttley@DastardlyHQ.org wrote: >>> On Wed, 23 Apr 2025 18:43:33 -0000 (UTC) >>> Kaz Kylheku <643-408-1753@kylheku.com> wibbled: >>>> On 2025-04-23, bart <bc@freeuk.com> wrote: >>>>> On 23/04/2025 16:31, David Brown wrote: >>>>>> On 22/04/2025 22:03, bart wrote: >>>>> >>>>>> Too few levels of functions and/or macros (there is no semantic >>>>>> difference between macros and functions in this matter) >>>>> >>>>> There is a great deal of difference. Functions tend to be well-formed in >>>>> their inputs and outputs. >>>>> >>>>> Macros take some abitrary blocks of syntax and return another arbitrary >>>>> block of syntax: >>>>> >>>>> #define INDEX(a, b, y) a y b >>>>> INDEX(a, i, [) ]; >>>> >>>> While that's terrible, I've never seen anything like it in the wild. >>> >>> He loves coming up with unrealistic code examples that no decent programmer >>> would ever write then points and says look how bad macros must be. Using that >> >>> approach you can easily come up with highly contorted code that no one can >> read >>> as the Obfuscated C contest proves. >>> >> >> And you do like totally ignoring the context. This was an example of how >> macros work compared with how functions work. > > You think anyone in this group needed to be told? Macros arn't supposed to > work the same way as functions or there'd be no point having them! I was replying to this which implies the opposite: DB: > Too few levels of functions and/or macros (there is no semantic > difference between macros and functions in this matter) MD: > Not always. Heard of void? I /knew/ you seize upon that! Then I might also say: "You think anyone in this group needed to be told?". FWIW, in my language, and a few others, 'functions' ALWAYS return values.