Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: C language binding of P1888 operations, especially min and max



Dmitry & P1788

On 2013 Oct 8, at 04:28, Dmitry Nadezhin wrote:
> The k-ary "min" and "max" are convenient,
> they are nice in compiler implementation.
> 
> However, they are not so nice in library implementation.
> The macro approach supplies solution only for a few k.
> ...
This seems true from the discussion in the last few days.

> So I suggest to drop k-ary "min" and "max" from the standard.
> and to keep in the required operations only binary "min(x,y)" and "max(x,y)".
> This doesn't forbid implementations to implement them
> (as well as k-ary versions of other associative operations "add", "mul")
> but this will make API of library implementations cleaner.

I agree with this and propose to change the text accordingly (Dmitry has offered some amended text). If anyone disagrees strongly, let them put forward a motion about it, but I hope we have a consensus.

I think this is a good example of the lessons we can learn from people writing reference implementations. As far as I know there are 3 groups doing this: (1) Richard Fateman, (2) Dmitry Nazhedin, (3) Juergen WvG with Marco Nehmeier. On behalf of P1788 I say "thank you" to them.

John Pryce