Closed jasonhemann closed 2 years ago
Yes. (+ 1 2 3)
is easy to understand. I have found (<= 1)
is a source of errors.
If you find (<= 1)
to be a source of errors, why is allowed?
It shouldn't but I guess we enabled it.
Backwards compatibility rules?
I realize I'm not the primary audience, but I think I was more surprised by the discrepancy in behavior than I would have been by either choice consistently. FWIW, a couple of UG TAs were also in situ surprised by the discrepancy.
Do “backward compatibility” + “law of least surprise” now add up to an argument for making all the arithmetic primitives polyvariadic? Or would that be compounding a mistake?
FWIW, I don't have a strong opinion here :)
I do. I think functional but not error backwards compatibility must win for such things that instructors and teachers use.
I was surprised to see that in BSL
+
is defined an 2-or-more ary, but some other functions like<=
are 1-or-more ary. Why? I'm sure there's a good reason for the discrepancy. But is the reason something better than just to show off that numeric functions can have different minimal arities? Is this just an artifact of the<=
, etc. behavior being recently augmented for 8.6?