From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) by sourceware.org (Postfix) with ESMTPS id 69A2C3858D28 for ; Sun, 10 Oct 2021 18:31:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 69A2C3858D28 Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTP id ZbWomdWGVps7PZdbXmq41N; Sun, 10 Oct 2021 18:31:23 +0000 Received: from kylheku.com ([70.79.163.252]) by cmsmtp with ESMTPA id ZdbXmNsmH2J2fZdbXmcb9x; Sun, 10 Oct 2021 18:31:23 +0000 X-Authority-Analysis: v=2.4 cv=P8xZOgMu c=1 sm=1 tr=0 ts=6163317b a=95A0EdhkF1LMGt25d7h1IQ==:117 a=95A0EdhkF1LMGt25d7h1IQ==:17 a=IkcTkHD0fZMA:10 a=SMorJkV_YP8A:10 a=8gfv0ekSlNoA:10 a=uq-M-2UyAAAA:8 a=MWbpTK8y4rl1Nqbp7pQA:9 a=QEXdDO2ut3YA:10 a=AeAU7NluiN0A:10 a=Jus5J9FnR3dmbuPB4d3d:22 Received: from www-data by kylheku.com with local (Exim 4.72) (envelope-from <382-725-6798@kylheku.com>) id 1mZdbW-0005qT-NZ; Sun, 10 Oct 2021 11:31:22 -0700 To: Martin Uecker Subject: Re: wide function pointer type X-PHP-Originating-Script: 501:rcmail.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Date: Sun, 10 Oct 2021 11:31:22 -0700 From: "Kaz Kylheku (libffi)" <382-725-6798@kylheku.com> Cc: libffi-discuss@sourceware.org In-Reply-To: <54e81ff3a4a6569798ba879c47392d4b19ec599b.camel@gmail.com> References: <09d27268d43fc4a8885695eba840faa4@mail.kylheku.com> <54e81ff3a4a6569798ba879c47392d4b19ec599b.camel@gmail.com> Message-ID: <189d4e33bd719e49e0fa63b607678606@mail.kylheku.com> X-Sender: 382-725-6798@kylheku.com User-Agent: Roundcube Webmail/0.9.2 X-CMAE-Envelope: MS4xfIgM11QAbGxNB2XG5PhA2lE/NGuqOZQvN6iIFm/x4TjLSRaPFoHQGVbhwvN9Q2KKLFv0cK90IFSZyNn0giZ5LGXgqqet61zFnnuaMTSLkFiPdOWofSqE g4ubpnNY6391vXx3bPl9PPMD/HEIsV2qK3sRedulJeudJzSf+SIkuzA0kzalXCNzHR+AAK8eeRKzLoR93OMU7PVJo2umYwOpffIY9PtVadMKgWQoP3B9/0p0 X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_05, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, FROM_STARTS_WITH_NUMS, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libffi-discuss@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libffi-discuss mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Oct 2021 18:31:26 -0000 On 2021-10-10 10:44, Martin Uecker wrote: > Am Sonntag, den 10.10.2021, 10:01 -0700 schrieb Kaz Kylheku (libffi): >> On 2021-10-10 04:32, Martin Uecker via Libffi-discuss wrote: >> > Hi all, >> > >> > I will propose a wide function pointer type (actually >> > a wide function type) to WG14 for C23 as a common >> > type for callbacks, closures, which now require an >> > additional void pointer argument in C APIs. This >> > is intended to be compatible with ABIs with now >> > use a static chain register. >>=20 >> Opposed. There is nothing wrong with separate arguments >> for function pointer and context. >=20 > Noted. Your argument sbelow all boil down to the point > that there are cases where it might not be the ideal > choice. But nobody forces anyone to use it. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Marin, you should know very well that this argument holds only for the lone hacker working by herself or himself. I don't fault you; It has been trotted out by some great minds. For instance, in some interview in the early 1990's, Knuth made some nice remarks about the C language, and noted that you can ignore the parts you don't like, or something to that effect.(*) If you're Knuth working by yourself on some great all-American program, you can, for instance, declare that the do/while statement is evil, and never use it. Outside of that, there are multiple somebodies who effectively force you to use something. You have to use something if you work with other people's code where it is prevalent. For instance it appears in legacy code you're working with and is not easy to eliminate. Or in third party API's. Moreover, if a feature is a standard part of the language, you will face standard-backed, authoritarian arguments against your preference of eschewing it. Sometimes, it's really better to just nip it at the bud. --- * http://softpanorama.org/People/Knuth/knuth_interview.html "Knuth: I think C has a lot of features that are very important. The way C handles pointers, for example, was a brilliant innovation; it solved a lot of problems that we had before in data structuring and made the programs look good afterwards. C isn't the perfect language, no language is, but I think it has a lot of virtues, and you can avoid the parts you don't like."