[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should we be touching goops?
From: |
David Kastrup |
Subject: |
Re: Should we be touching goops? |
Date: |
Sun, 05 Jun 2022 22:12:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Jean Abou Samra <jean@abou-samra.fr> writes:
> Le 05/06/2022 à 14:36, David Kastrup a écrit :
>> Something like ly:moment-add has fewer implied semantics than + . Not
>> just for humans (who expect + to be more-or-less commutative and
>> associative even though the latter is only approximately the case with
>> floating point arithmetic) but even for Scheme which extends a two-term
>> definition of + into + with an arbitrary larger amount of summands.
>
> Wouldn't the same concerns apply on the C++ side, though?
> I mean, Moment already implements operator+ etc., and C++
> understands a + b + c as (a.operator+(b)).operator+(c).
> How would the C++ side of things be refactored if a distinction
> between points of time and time spans is introduced?
There is a slight difference in that C++ does not have something like
(- a b c)
where an operator can cover an arbitrary number of terms (and the
compiler chooses to apply it multiple times on its own). There is also
a difference in that the C++ realm is behind a much taller barrier to
the average (and non-average) user than the Scheme realm is and thus
there is less incentive to accommodate "naïve expectations" to the same
degree.
So I'd say that would be a different discussion. Not that I'd be
particularly looking forward to it.
--
David Kastrup
- Re: Should we be touching goops?, (continued)
- Re: Should we be touching goops?, David Kastrup, 2022/06/04
- Re: Should we be touching goops?, Jean Abou Samra, 2022/06/05
- Re: Should we be touching goops?, David Kastrup, 2022/06/05
- Re: Should we be touching goops?, Jean Abou Samra, 2022/06/05
- Re: Should we be touching goops?, David Kastrup, 2022/06/05
- Re: Should we be touching goops?, Dan Eble, 2022/06/05
- Re: Should we be touching goops?, Dan Eble, 2022/06/05
- Re: Should we be touching goops?, David Kastrup, 2022/06/05
- Re: Should we be touching goops?, Jean Abou Samra, 2022/06/05
- Re: Should we be touching goops?, Jean Abou Samra, 2022/06/05
- Re: Should we be touching goops?,
David Kastrup <=
- Re: Should we be touching goops?, Luca Fascione, 2022/06/05
- Re: Should we be touching goops?, Jean Abou Samra, 2022/06/05
- Re: Should we be touching goops?, Luca Fascione, 2022/06/05
- Re: Should we be touching goops?, David Kastrup, 2022/06/05
- Re: Should we be touching goops?, Luca Fascione, 2022/06/05
- Re: Should we be touching goops?, David Kastrup, 2022/06/05
- Re: Should we be touching goops?, Luca Fascione, 2022/06/05
- Re: Should we be touching goops?, David Kastrup, 2022/06/04
Re: Should we be touching goops?, Jean Abou Samra, 2022/06/03