English: I didn’t realize there are pretty firm rules regarding prefer and rather (e.g., here and here); I’ve always played it by ear. For my own reference, here’s a little rundown (based on the links above). As usual, what I write might not be entirely correct.
For general preferences (prefer):
- I prefer pizza to celery. I prefer eating to running.
- I do not like celery; I prefer to eat pizza. I prefer eating pizza to celery.
- I prefer pizza rather than celery.
Notice that to can be used after prefer in two ways: between two nouns (or activities), or as a to-infinitive form. The –ing form is also fine, but sounds a bit less natural to me (see #2 above).
For specific preferences (would prefer):
- I ate celery yesterday; I‘d prefer to eat pizza today.
- I’m craving cheese right now; I‘d prefer pizza. I would prefer to eat pizza.
- I‘d prefer to eat this pizza rather than run up that hill. (Note that the second infinitive does not have a to.)
It seems that here, we must use the to-infinitive; the –ing form is not fine (even though “I’d prefer driving” sounds very natural to me). To remember this, observe that the “d” in would and the “t” in to are aveolar stops, so they must go together.
Remark: We can use would rather for both general and specific preferences:
- I‘d rather drive a car than ride a bike. (general)
- I ate celery yesterday; I‘d rather eat pizza today. (specific)
We never use to with would rather: we use than, or the to-infinitive without the to. And of course, we can’t rather anything; rather (as a verb) is always preceded by a would.
However, rather can be used as part of the phrase rather than; here, the verb can be prefer or would prefer, depending on specificity (see the #3 examples above).
For other people:
I think this situation is the most complicated. When referring to the actions of other people, we can use would prefer or would rather. With would prefer, we add object pronoun + to-infinitive, or we add “it if” + past simple. The latter sounds more natural to me:
- She‘d prefer me to eat the celery. She‘d prefer it if I ate the celery.
- I‘d prefer him to drive. I‘d prefer it if he drove.
- This film is scary; they‘d prefer their children to not watch it. They‘d prefer it if their children didn’t watch it.
In contrast, with would rather, we simply add a past simple:
- She‘d rather I ate the celery.
- I‘d rather he drove.
- This film is scary; they‘d rather their children didn’t watch it.
||specific, other people
||general or specific, other people
||n/a; used in “(would) prefer … rather than”
Finally, let’s look at some incorrect sentences:
- I prefer pizza than celery. (When making comparisons after prefer, we use to or rather than.)
- I prefer drive. (After prefer, we use to-infinitive or –ing.)
- I‘d prefer driving tonight. (After would prefer, we use a to-infinitive or a noun. But again, this sentence sounds very natural to me.)
- I‘d rather eat pizza rather than celery. (The verb preceding rather than should be prefer or would prefer.)
- She‘d prefer me eating the celery. (Here after would prefer, we use a to-infinitive.)
- I‘d rather he drive. I‘d rather him drive. (After would rather, we would add a past simple. But this sentence sounds natural to me.)
So in conclusion, would rather seems to be the (grammatically) safest, easiest bet. It can be general or specific, and for other people, we just add a past simple phrase. But it can also sound a bit disrespectful, considering that people often use would rather in jokes or exaggerations.