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: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: bart Newsgroups: comp.lang.c Subject: Re: Recursion, Yo Date: Fri, 12 Apr 2024 10:38:52 +0100 Organization: A noiseless patient Spider Lines: 52 Message-ID: References: <87edbestmg.fsf@bsb.me.uk> <_zSRN.161297$m4d.144795@fx43.iad> <20240411075825.30@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 12 Apr 2024 11:38:54 +0200 (CEST) Injection-Info: dont-email.me; posting-host="b4e55c9728b3282b5449551fe3e50c2b"; logging-data="2405901"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19X6SceL39BI4XjrZQwPvRi" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:vS6H0Njge7h+luDCPdr7P0aGuA8= In-Reply-To: Content-Language: en-GB Bytes: 3081 On 12/04/2024 06:32, Janis Papanagnou wrote: > On 12.04.2024 04:31, Lawrence D'Oliveiro wrote: >> On Thu, 11 Apr 2024 15:15:35 GMT, Scott Lurndal wrote: >> >>> As someone who cut his teeth on >>> Unix V6, an empty parameter list is less self-documenting than an >>> explicit (void). >> >> Should that apply when calling the function as well? >> >> res = func(void); >> >> instead of >> >> res = func(); (What happens in Python when 'func' has multiple /optional/ parameters which have all been omitted; do you need to document them in the call to distinguish this from a call to a function which genuinely has no arguments?) >> >> ? > > Ideally it would be (without syntactic ballast) just > > res = func; > > (as many programming languages have it designed), in > function definition and function call; no parameters, > no unnecessary parenthesis. I used to allow 'func' to call a function with no args. Later I switched to using func() as being more informative, since just: func doesn't impart very much. Maybe it's a function call; maybe it's a goto to label 'func' (as I still allow); maybe it's a macro invocation; maybe it's just evaluating a variable 'func' then discarding the value. Using func() becomes more necessary with dynamic code; if P is a reference to a function, then what does this mean: Q := P Is this copying the reference to Q, or calling P() and copying the result? Using &P to disambiguate won't work here: that will create a reference to the reference! So F() is really doing CALL F; it's making it explicit.