Open sritchie opened 3 years ago
I've started this over in sicmutils/sicmutils#262 - I've got =
plugged in. Next I'll generalize to handle the other comparison operators.
@hcarvalhoalves , I have come around to the idea that we want special constructors for this — maybe sym:=
or something, but not =
. it would be too easy to write tests like (is (= ...))
and have it succeed, because the thing is falsey.
The other note is that we'll be in GREAT shape if we simply make these return a Literal
with a new type. Not ::x/numeric
, but ::x/boolean
or something. Then (+ (= 'x 'y) 'z)
will NOT work (which is good)... but we can add a new set of boolean operations, with symbolic versions of or
, and
, not
.
Thoughts?
@hcarvalhoaves and CTW in Clojurians Slack noted that this would be great.
Some tasks:
=
and inequality expressions::v/numeric
->infix
etcWe might want inequalities represented with a new record type, rather than an expression with an embedded
<=
. But they should certainly freeze to that.