chibi-scheme
chibi-scheme copied to clipboard
Chibi doesn't check single argument to `+` and `*`
Hello!
It looks like Chibi doesn't check single argument to +
and *
:
;; a is not bound:
;;
> (- 'a)
ERROR on line 2: invalid type, expected Number: a
> (/ 'a)
ERROR on line 5: invalid type, expected Number: a
> (+ 'a)
a ;; <== oops!
> (* 'a)
a ;; <== oops!
I just opened the issue and I see that both Guile and Gauche do the same. Is this allowed by the standard? If it is, I apologize for the noise!
In R7RS, "it is an error" but an implementation need not signal an error. While Chibi's behavior may hide programming errors, it is allowed by the standard.
Ok I understand... But still, +
is returning a wrong value as result.
Anyway, I'm ok with closing the bug, no problem.