Yes, I understand that. I’m saying that the color()
function is defined by the API, so it’s weird that you can’t call them. I’m agreeing with you guys that this seems buggy.
This program is not confusing. Reusing method or variable names is completely fine, as they are not reserved keywords. I can define my own ArrayList
class, or overload the main()
method if I want. This is all completely fine. Maybe a bad idea for other reasons, but syntactically valid.
My only point is that the color
keyword is a type in Processing. So it makes sense that it would be treated as a reserved keyword. I understand that under the hood it’s an int
, but I’m saying that there’s a certain logic for color
to be disallowed. I agree that you should still be able to use the color()
function.
Basically the original bug is that Processing used color
as both a type and a function name, which makes it impossible to be consistent.