Re: make it so that (=? "hi" "hi") works
Sandra Snan 26 May 2021 19:38 UTC
Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> writes:
> I don't think so. You need a Scheme that supports identifier properties (or
> something equivalent) through its macro system. Chez Scheme does and is
> certainly one of the best choices when it comes to high-quality
> implementations (if R6RS + a lot of extensions are enough for you).
I'm still on Chicken after all these years. As you could probably guess
from my hacky&leaky approach to code I haven't been overly concerned
with portability.
> Actually, you don't because a case-insensitive comparison may make as much
> sense as a byte-by-byte comparison. So I believe that the situation with
> comparators is not much different from the situation of generic algebra.
That's fair. Luckily I had a solution to the generic linear algebra
library that still involved an interface of (operator operand operand),
for all my map and reduce shenanigans.
Similarly, (sort lis (foo bar)) is fine.
> No, I mean m1 and m2. (matrix-ring ring) just constructs a new ring whose
> elements are matrices over the ground ring.
Yes, that part wasn't in question.
The weird part was appling an element multiplier to two matrices.
So either
((ring-element-* (matrix-ring ring)) e1 e2)
or
((matrix-* (matrix-ring ring)) m1 m2)
but you wrote:
((ring-element-* (matrix-ring ring)) m1 m2)
> Yes, let's explore viable ways to make generic interfaces in Scheme. Maybe
> we should then reconsider the question about =?.
OMG, I didn't think we would arrive to a hand-shake solution to this
li'l flamewar, but here we are in complete agreement.