4 ms·
wordy maybe, but incredibly easy to understand upon coming back to the code. At least, more than a list of 5+ unnamed arguments in an arbitrary order made up by
by programminggeek 13y ago
wordy maybe, but incredibly easy to understand upon coming back to the code. At least, more than a list of 5+ unnamed arguments in an arbitrary order made up by someone you'll never meet and you can only understand by looking at the api docs, if there are any.
- JoeAltmaier 13y agoI'd agree, except arguments are rarely just a list of numbers. With well-named constants, methods and variables its pretty clear what's being passed.
- programminggeek 13y agoYes, but in the case of a sometimes inconsistent API, you get things like string methods that are sometimes method(needle, haystack) and sometimes method(haystack, needle) and so on. If you were sending properly labeled messages, like you are forced to do in just about every web api ever, you can at least inspect the message to get an idea what is going on. It's sort of weird to me that so much effort goes into making programming languages expressive, yet we cling to incredibly terse method names, sometimes too terse, and no labels on method inputs. So, if you don't know what some bit of code does, you have to figure out what the methods are doing and what arguments they are supposed to take. I guess to me it's like if you had to do a dictionary lookup for every word you read and had minimal context to understand a words meaning in the context of the other words around it. At the very least you would cling to a dictionary if you wanted to get anything done.