fxneg, overflow Alex Shinn (30 Dec 2016 06:01 UTC)
Re: fxneg, overflow John Cowan (30 Dec 2016 07:09 UTC)
Re: fxneg, overflow Marc Feeley (30 Dec 2016 18:06 UTC)
Re: fxneg, overflow Marc Nieper-Wißkirchen (30 Dec 2016 18:14 UTC)
Re: fxneg, overflow Alex Shinn (04 Jan 2017 06:46 UTC)
Re: fxneg, overflow Marc Nieper-Wißkirchen (04 Jan 2017 09:05 UTC)
Re: fxneg, overflow Alex Shinn (04 Jan 2017 09:23 UTC)
(missing)
Re: fxneg, overflow Alex Shinn (10 Jan 2017 15:16 UTC)
Re: fxneg, overflow Marc Nieper-Wißkirchen (10 Jan 2017 18:09 UTC)
Re: fxneg, overflow Marc Nieper-Wißkirchen (04 Jan 2017 10:16 UTC)
Re: fxneg, overflow John Cowan (06 Jan 2017 19:50 UTC)
Re: fxneg, overflow Marc Nieper-Wißkirchen (06 Jan 2017 20:08 UTC)
Re: fxneg, overflow John Cowan (06 Jan 2017 20:52 UTC)
Re: fxneg, overflow Marc Nieper-Wißkirchen (06 Jan 2017 22:26 UTC)
Re: fxneg, overflow Alex Shinn (10 Jan 2017 15:27 UTC)
Re: fxneg, overflow Marc Nieper-Wißkirchen (30 Dec 2016 18:55 UTC)
Re: fxneg, overflow John Cowan (31 Dec 2016 02:34 UTC)

Re: fxneg, overflow Marc Feeley 30 Dec 2016 18:06 UTC

> On Dec 30, 2016, at 1:01 AM, Alex Shinn <xxxxxx@gmail.com> wrote:
>
> Since a primary motivation of this SRFI is performance,
> and variadic procedures are slow in many implementations,
> it may be worth specifying fx- to always take 2 arguments,
> and providing a fxneg (or fx-negate) for the unary case.

I don’t like this argument for fxneg.  There are other Scheme primitives that also need to handle optional parameters (+, -, *, /, atan, min, max, gcd, lcm, string->number, make-string/vector, read-char, write-char, peek-char, read, write, …).  Some of these, particularly + and -, are important to implement efficiently, so I would expect a good implementation of Scheme to handle optional parameters well (either by special casing the code generation, or having a parameter passing mechanism such as #!optional). It would be unfortunate to steer the language/API for poor implementations of Scheme… I wouldn’t want to see atan2, min2, min3, etc. introduced by the same argument.

Moreover having both fxneg and fx- breaks the parallel with -, so the programmer has to remember one more inconsistency.  I guess that could be seen as an argument for introducing plain neg for consistency… :-(

Anyway, just my 2 cents…

Marc