Credit score impact is basically identical. Fannie Mae/Freddie Mac might allow you to get one of their backed mortgages sooner if a short sale however.
The answer to that question depends on the home owner. The analysis is on a case by case basis. Some of the factors to consider:
1. Do they live in the home?
2. Are the loans purchase money?
3. What is their overall financial situation?
4. Is their "hardship" compelling?
5. Individual tax implications.
6. Market conditions in their area.
7. Are the sellers open to aggressively marketing their home while they remain in it?
I could go on and on. This is the main reason why I am an advocate of having distressed home owners speak with real estate and tax professionals who specialize in this area.
Foreclosures are harder on the homeowner's credit and don't allow the homeowner to control the process. Short sales are easier on credit scores and allow more control over the process, but they are time consuming, require full cooperation from the homeowner, a knowledgeable real estate professional, great negotiating skills and patience, patience, patience. Unfortunately, even with all that, many short sale attempts end in foreclosure.
Of course, as Artur pointed out, if the home owners have the ability to make reasonable payments to the bank, a loan modification is always one of the options that should be explored. Unfortunately, in today's economy, many of the people I am coming across don't even have the ability to make a reasonable payment due to loss of job, job cutback, family illness or other harship.
Hope this helps.
The best is loan modification if one would like to stay in the house. Lenders are much more forthcoming doing modifications these days. You might do them even without defaulting on payments. If one wants to leave the house, short sale is better, as the credit implications are much less severe as it is for foreclosures.