The first chapter of The Death and Life of Great American Cities touches on this topic a lot. Community safety is enhanced by mixed use, because there are reasons for people to naturally be there at all hours of the day/night. This contrasts with single use areas, which are essentially ghost towns in their off-hours.