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 connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <20240411075825.30@kylheku.com>
Deutsch   English   Français   Italiano  
<20240411075825.30@kylheku.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Kaz Kylheku <643-408-1753@kylheku.com>
Newsgroups: comp.lang.c
Subject: Re: Recursion, Yo
Date: Thu, 11 Apr 2024 15:04:24 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <20240411075825.30@kylheku.com>
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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 11 Apr 2024 17:04:25 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0cee97af41ea72e01665d97a873fd1de";
	logging-data="1847540"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/a2Q9xp5qcdm4jpLKBEF9MuHO9WantOwk="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:uhjnWxIiP82XCVlN6seVl0z/Yvc=
Bytes: 2745

On 2024-04-11, Scott Lurndal <scott@slp53.sl.home> wrote:
> David Brown <david.brown@hesbynett.no> writes:
>>On 11/04/2024 02:18, Lawrence D'Oliveiro wrote:
>>> On Wed, 10 Apr 2024 16:46:43 +0200, David Brown wrote:
>>> 
>>>> Just for your entertainment, with C++ lambdas this is now legal code:
>>>>
>>>> void foo(void) {
>>>> 	[](){}();
>>>> }
>>> 
>>> C programmer still has habit of writing “(void)” when C++ allows “()”
>>> instead.
>>
>>I do that sometimes, yes.  I could argue that I think it is better to be 
>>explicit than implicit, but it's just my fingers on automatic. 
>
> I would use the same argument.   Make it explicit.

(void) is a dongle intoduced in ANSI C so that () could continue
to mean "unknown number of parameters". It didn't exist in C++
until ANSI C invented it.

() is a perfectly explicit empty list. (void) does not look empty;
it looks like it's declaring one parameter of type void.

An actual implicit empty parameter list might look like this:

  function foo
  {
  }

Once you have empty parentheses, that is explicit.

Countless programming languages have only (); no such thing as (void) or
similar ugly hack, due to not having a quirky history that would have
caused such a thing to be required.

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca