C++ Logo

std-proposals

Advanced search

Re: Making parameter names clearer than func(true, false);

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Mon, 8 Jul 2019 22:23:23 +0300
On Mon, 8 Jul 2019 at 22:19, Hyman Rosen via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> On Mon, Jul 8, 2019 at 2:41 PM Thiago Macieira <thiago_at_[hidden]> wrote:
>>
>> So when coming up with examples of where named parameters would be useful,
>> please find good APIs that would become even better, or at least find bad ones
>> that have other reasons for being bad.
>
>
> Posix system calls, an API that isn't about to change and doesn't care whether you
> think it's good or bad:
> ssize_t int write(int fd, void *buf, size_t count);

If the API isn't about to change, you're unlikely to be able to call
it with named arguments.

Received on 2019-07-08 14:25:28