Deutsch English Français Italiano |
<uvbbed$2cdhc$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!.POSTED!not-for-mail From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com> Newsgroups: comp.lang.c Subject: Re: Recursion, Yo Date: Fri, 12 Apr 2024 15:03:08 +0200 Organization: A noiseless patient Spider Lines: 43 Message-ID: <uvbbed$2cdhc$1@dont-email.me> References: <uut24f$2icpb$1@dont-email.me> <uutqd2$bhl0$1@i2pn2.org> <uv2u2a$41j5$1@dont-email.me> <87edbestmg.fsf@bsb.me.uk> <uv4r9e$mdd3$1@dont-email.me> <uv5e3l$q885$1@dont-email.me> <uv5gfd$qum1$1@dont-email.me> <uv5lgl$s6uj$1@dont-email.me> <uv61f6$v1jm$1@dont-email.me> <uv68ok$11080$1@dont-email.me> <uv7a8n$18qf8$3@dont-email.me> <uv867l$1j8l6$1@dont-email.me> <_zSRN.161297$m4d.144795@fx43.iad> <20240411075825.30@kylheku.com> <r8TRN.114606$Wbff.54968@fx37.iad> <uva6ep$24ji7$1@dont-email.me> <uvah1j$26gtr$1@dont-email.me> <uvanua$27qn8$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Fri, 12 Apr 2024 15:03:10 +0200 (CEST) Injection-Info: dont-email.me; posting-host="3e64961bc4a57bf84ee9ec3ae5d82c42"; logging-data="2504236"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Tj4ETz/bkSizHFHD+aPBk" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:mudPC+q56wG9gbXiQJqzjgJs1M8= X-Enigmail-Draft-Status: N1110 In-Reply-To: <uvanua$27qn8$1@dont-email.me> Bytes: 3510 On 12.04.2024 09:30, David Brown wrote: > > I prefer the consistency of function calls using parenthesis. The > consistent alternative, found in some other languages, is that they > never need parenthesis - "foo a b" calls "foo" with parameters "a" and "b". Mind that this is just one "consistency" aspect. Another one is that you can write (e.g. in Algol 68 or many other higher level languages) the equivalent of - again a simple example - int x = 2 * pi * r without necessity to know whether pi is a constant, the result of a function (calculation), the result of a function implicitly called just once on demand, or whatever else. Conceptually as a programming language user you want the value. I don't say one or the other is "better", just that consistence is not an absolute property. (But also that Algol 68, WRT a consistent formal language design, is indeed very different from C in quality.) > > (Of course you'd need some syntax for referring to the function itself, > or its address - "fp = &foo;" would not be too onerous, IMHO.) All repliers to my post mentioned references or addresses; I think, beyond personal preferences, it is a key observation that this is unnecessary if the language (and its compiler) handles that per its semantics. In Algol 68 you can define fp = foo but you don't need an "address value" introduced. Preferences are probably heavily influenced by the set of languages one started with, so it's not useful to dispute here. But I think it's noteworthy to anticipate that it's not a "legacy" thing with languages that evolved around 1967 to 1972; Eiffel and other important languages (I think also Ada) later also took that path. It's also noteworthy that these languages focus on programming safety; and I suppose that there's no dissent here about the programming safety in C as opposed to the languages mentioned in the other reply I just gave. Janis