4 ms·
You misread what he said. He misses named arguments, not typed ones.
by eevilspock 15y ago
You misread what he said. He misses named arguments, not typed ones.
- kibwen 15y agoOn the contrary, what he really misses is the "self-documenting nature" of Objective-C source code. And when it comes to functions, the four bits of documentation that are more important than any other are: 1) the order (or names) of its arguments (how to call it) 2) the types of its arguments (what to feed it) 3) the type of its return value(s) (what to expect) 4) whether the function maintains referential transparency (whether it plays nice with the rest of your program) Relying on type inference in the function signature abandons two of these and forces the casual reader to manually infer the manner in which the function may be safely used. Of course, in this position, one may always opt to use a documentation generation tool (doxygen, rdoc, javadoc, etc.)--however, when it comes to this, our code can no longer be considered to be self-documenting.
- eevilspock 15y agoWhat part of "THE ONLY Objective-C feature I miss when coding in other languages is NAMED ARGUMENTS" don't you understand?