I agree that ditching should never be considered a good option, even if it happens be the best option under a given set of circumstaces. Don't get caught in believing that a ditching will automatically save the day. It very well may not. Furthermore, the type of aircraft may have a large effect on the qualtiy of the outcome.
Although I would argue that at nighttime ditching a short ways off shore is probably the best option if you aren't near any airports, particularly if you are in forested, mountainous, or densely populated areas. Of course, getting the airplane in the water is only the beginning of the struggle that will ensue.