@Xlc answer extension
The answer is the syntax difference between Objective-C and "normal" C / C ++.
Returning to the origins of the Unix and C days, in the late 60s / early 70s, declaring (not defining) a function, you did not need to indicate how many arguments it took, or what types they should have been. Also, you did not need to indicate whether it returned a value.
Later, people realized that this would be a good idea, both for better detection of errors during compilation, and for greater efficiency of the generated code. Thus, developers have added the ability to specify argument types in a function declaration. This was standardized as part of ANSI C in the late 80s.
However, it was necessary to maintain backward compatibility with existing code. Thus, the declaration of the function foo() cannot be considered a “function without arguments”. To solve this problem, the void keyword was introduced. This allowed you to say foo(void) as "a function named foo that takes no arguments."
When Objective-C was invented in the 90s, they added new syntax for defining methods. Since there was no deprecation code, they simply said that the method should declare all its arguments; if there are none, then the method takes no arguments.
Objective-C still uses the void keyword to indicate that the method does not return any value.
source share