Skip to content

No warning for calls with incorrect number of parameters #1364

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

Closed
jvolker opened this issue Apr 16, 2016 · 1 comment
Closed

No warning for calls with incorrect number of parameters #1364

jvolker opened this issue Apr 16, 2016 · 1 comment

Comments

@jvolker
Copy link
Contributor

jvolker commented Apr 16, 2016

No warning or errors appears if a function was called with an incorrect number of parameters.

e.g. ellipse(mouseX,mouseY,10); which requires 4 parameters, doesn't show anything, but obviously doesn't run either.

@lmccart
Copy link
Member

lmccart commented Apr 21, 2016

good suggestion. this is one of the annoying things about the JavaScript language itself, it doesn't throw any error when you don't have the right number of arguments so things can fail silently, making things very hard to debug!

luckily @iamjessklein and @toolness are thinking about ways to add functionality to the p5.js library to add warnings and errors that make things friendlier for beginners.
#971

you can follow along with their research and progress here: http://processing.toolness.org/

stay tuned!

@lmccart lmccart closed this as completed Apr 21, 2016
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

2 participants