4 ms·
"Up", "down", and "over" aren't adverbs. Frequently they're prepositions, but in verbs like "set up" they're just part of the verb itself, since "set up" can't
by mcphage 12y ago
"Up", "down", and "over" aren't adverbs. Frequently they're prepositions, but in verbs like "set up" they're just part of the verb itself, since "set up" can't be understood by the meanings of "set" and "up". (See http://en.wikipedia.org/wiki/Phrasal_verb http://en.wikipedia.org/wiki/Phrasal_verb for more info).
And also: what on earth is the author proposing the methods be named then? Rename "setupInstance" to "setInstanceUp"? In what way is that clearer or more readable? And really, "setup" and the like have become verbs through usage already. Which would you be more likely to say?
1. Can you set a new user up for me?
2. Can you setup a new user for me?
For me, #1 sounds awkward, #2 sounds more natural. Similarly for cleanup, teardown, and other common computer tasks.
- wallyhs 12y agosetUpInstance vs. setupInstance. Because "setup" is a noun, setupInstance looks like it could return a setup's instance. setUpInstance looks like it performs an action.
- Rangi42 12y agoOr, setUpInstance looks like it's the setter for an upInstance variable, whereas setupInstance has an obvious connection to the "setup" action even if it's grammatically incorrect.
- wallyhs 12y agoHaha, very true. That is one reason I like underscores: you can distinguish between setup_instance, set_up_instance, and set_upinstance. Or maybe set_up_upinstance. In context, it probably wouldn't matter unless you have both "setup" and "upinstance" types running around.
- jcbrand 12y agoThe second example is written: Can you set up a new user for me.