From: "Kaz Kylheku (libffi)" <382-725-6798@kylheku.com>
To: Martin Uecker <ma.uecker@gmail.com>
Cc: libffi-discuss@sourceware.org
Subject: Re: wide function pointer type
Date: Sun, 10 Oct 2021 11:31:22 -0700 [thread overview]
Message-ID: <189d4e33bd719e49e0fa63b607678606@mail.kylheku.com> (raw)
In-Reply-To: <54e81ff3a4a6569798ba879c47392d4b19ec599b.camel@gmail.com>
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.
>>
>> Opposed. There is nothing wrong with separate arguments
>> for function pointer and context.
>
> 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."
next prev parent reply other threads:[~2021-10-10 18:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-10 17:01 Kaz Kylheku (libffi)
2021-10-10 17:44 ` Martin Uecker
2021-10-10 17:49 ` Daniel Colascione
2021-10-10 18:05 ` Martin Uecker
2021-10-10 18:17 ` Daniel Colascione
2021-10-10 18:47 ` Martin Uecker
2021-10-10 18:57 ` Daniel Colascione
2021-10-10 19:24 ` Martin Uecker
2021-10-16 8:08 ` Jarkko Hietaniemi
2021-10-16 9:35 ` Jarkko Hietaniemi
2021-10-10 18:31 ` Kaz Kylheku (libffi) [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-10-10 11:32 Martin Uecker
2021-10-17 23:35 ` Anthony Green
2021-10-18 5:33 ` Martin Uecker
2021-10-18 5:58 ` Martin Uecker
2021-10-18 7:36 ` Florian Weimer
2021-10-18 7:56 ` Martin Uecker
2021-10-19 9:22 ` Florian Weimer
2021-10-19 9:43 ` Martin Uecker
2021-10-19 10:15 ` Florian Weimer
2021-10-19 12:13 ` Martin Uecker
2021-10-20 8:24 ` Kaz Kylheku (libffi)
2021-10-20 18:52 ` Martin Uecker
2021-10-20 9:10 ` Florian Weimer
2021-10-20 9:21 ` Martin Uecker
2021-10-20 9:27 ` Florian Weimer
2021-10-20 17:27 ` Kaz Kylheku (libffi)
2021-10-21 9:48 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=189d4e33bd719e49e0fa63b607678606@mail.kylheku.com \
--to=382-725-6798@kylheku.com \
--cc=libffi-discuss@sourceware.org \
--cc=ma.uecker@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).