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

Error message changes from "function" to "method" #3225

Closed
shiffman opened this Issue Apr 27, 2015 · 7 comments

Comments

Projects
None yet
4 participants
@shiffman
Member

shiffman commented Apr 27, 2015

In 3.0a7, Mac OS X 10.10, I'm noticing the following behavior.

size(200,200);
elipse(100,70,60,60); 

When I press run, I briefly see the error message The function "elipse(int, int, int, int)" does not exist and a second later it changes to The method "elipse(int, int, int, int)" does not exist. I believe we want to use the term "function" here?

@Manindra29 can you take a look at this?

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Apr 27, 2015

Member

It's part of the PDE.properties file (the language strings)

editor.status.undefined_method = The method methoddef does not exist
editor.status.empty_param = The method methoddef does not expect any parameters
editor.status.wrong_param = The method methoddef expects parameters like this:

@REAS will need to weigh in on the method vs function thing.

Member

benfry commented Apr 27, 2015

It's part of the PDE.properties file (the language strings)

editor.status.undefined_method = The method methoddef does not exist
editor.status.empty_param = The method methoddef does not expect any parameters
editor.status.wrong_param = The method methoddef expects parameters like this:

@REAS will need to weigh in on the method vs function thing.

@Plastix

This comment has been minimized.

Show comment
Hide comment
@Plastix

Plastix Apr 27, 2015

Contributor

I don't mean to barge in but in Java 'method' and 'function' can be used interchangeably. There might be some subtle differences if you go to different languages.

Contributor

Plastix commented Apr 27, 2015

I don't mean to barge in but in Java 'method' and 'function' can be used interchangeably. There might be some subtle differences if you go to different languages.

@shiffman

This comment has been minimized.

Show comment
Hide comment
@shiffman

shiffman Apr 27, 2015

Member

Thanks @Plastix. Yes, I agree they are interchangeable. My sense is that "function" is the more colloquial language of use in Processing examples and tutorials rather than "method". But I am not 100% sure. @REAS do you agree?

Member

shiffman commented Apr 27, 2015

Thanks @Plastix. Yes, I agree they are interchangeable. My sense is that "function" is the more colloquial language of use in Processing examples and tutorials rather than "method". But I am not 100% sure. @REAS do you agree?

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Apr 27, 2015

Member

We were very particular about it in the Processing book, which is why I was asking @REAS to weigh in... The general idea was that we used method when referring to something that was part of a class (that had been created by a user), but function when it wasn't. I agree that function is probably what we want to use here but wanted to verify w/ Casey so that we're all in sync.

Member

benfry commented Apr 27, 2015

We were very particular about it in the Processing book, which is why I was asking @REAS to weigh in... The general idea was that we used method when referring to something that was part of a class (that had been created by a user), but function when it wasn't. I agree that function is probably what we want to use here but wanted to verify w/ Casey so that we're all in sync.

@shiffman

This comment has been minimized.

Show comment
Hide comment
@shiffman

shiffman Apr 27, 2015

Member

That makes perfect sense. I suppose the error parser cannot distinguish easily between the two (and this likely comes up more often for beginners in the context of a mis-calling of a Processing core function) so I would err on the side of saying function. But yes, I'll stop now and wait for Casey's thoughts!

Member

shiffman commented Apr 27, 2015

That makes perfect sense. I suppose the error parser cannot distinguish easily between the two (and this likely comes up more often for beginners in the context of a mis-calling of a Processing core function) so I would err on the side of saying function. But yes, I'll stop now and wait for Casey's thoughts!

@REAS

This comment has been minimized.

Show comment
Hide comment
@REAS

REAS Apr 27, 2015

Member

In the world of Processing documentation, the word "function" is used like in C documentation for things like size() and line(). When a function is inside a class, it's called a method. Like with .toUpperCase(). This diverges from Java documentation, but it's how we've always done it.

Member

REAS commented Apr 27, 2015

In the world of Processing documentation, the word "function" is used like in C documentation for things like size() and line(). When a function is inside a class, it's called a method. Like with .toUpperCase(). This diverges from Java documentation, but it's how we've always done it.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Apr 27, 2015

Member

Ok, swapped 'em for 3.0a8.

Member

benfry commented Apr 27, 2015

Ok, swapped 'em for 3.0a8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment