Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overly humble error message for cannot-apply #13

Open
masak opened this issue Aug 31, 2020 · 0 comments
Open

Overly humble error message for cannot-apply #13

masak opened this issue Aug 31, 2020 · 0 comments

Comments

@masak
Copy link

masak commented Aug 31, 2020

Using the Windows executable of the 0.4.0 release:

$ ./chime.exe
> (nil)
I don't know how to evaluate this yet: (nil)

Two issues:

  • Phrasing: "yet" makes it sound like the evaluator is missing a case, the presence of which would allow it to handle (nil). That is not so; (nil) tries to apply a nil, which can not be applied. Chime is accepting blame for something that is not its fault. (Maybe this phrasing made more sense during active development.)

  • What's more relevant here is the value that causes the 'cannot-apply error — but the failing value is not printed, only the expression. In a debugging situation, the value is likely to be the much more important detail, basically answering "why did this call fail?". A second example might help here:

> (set foo "not a function, but a string")
"not a function, but a string"

> (foo 1 2 3)
I don't know how to evaluate this yet: (foo 1 2 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant