biwascheme / biwascheme

Scheme interpreter written in JavaScript
http://www.biwascheme.org/
MIT License
739 stars 129 forks source link

Allowing wrong number of arguments #12

Open EnSec4Git opened 12 years ago

EnSec4Git commented 12 years ago

I'm new to Scheme, so I don't know it this is allowed by the Scheme spec, but the Racket implementation in both R5RS and PrettyBig mode reports an error when using more arguments than needed. Is this is by design, or a bug?

(define (func x y) (* x y))
(func 2 3 4 5 6) ; This returns 6, despite using more arguments than required.

Tried this in repl.it (BiwaScheme version 0.5.7) and biwascheme.org (version 0.6.1).

yhara commented 12 years ago

Thanks for reporting. This is a bug. R6RS states that an exception should raised in that case. http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-12.html#node_sec_Temp_16

safinaskar commented 5 years ago

When I start to learn Scheme, I just go to repl.it and started to learn Scheme using this site. But then I discovered this bug and lots of other bugs. So, I want to tell the following: people new to Scheme will think that repl.it is "default" implementation of Scheme, and thus they will use it to learn Scheme and they will trust it. So, repl.it implementation should be free of such stupid bugs as this (i. e. #12).

So, please do one of the following:

People trust repl.it . People think that repl.it implementation is default, reference and confirming

safinaskar commented 5 years ago

Also, please contact all teaching sites using your interpreter (for example, http://blog.klipse.tech/scheme/2016/09/11/scheme-tutorial-1.html ) and tell them not to use it until you fix this bug (i. e. #12) and other bugs which makes the interpreter obviously non-confirming