I’ve lived in Chicago, currently in SF. Both cities are filled with homeless like I’ve never seen before. I’d say I felt less safe in Chicago, but in SF the homeless are more trashy: poops and seringes and crazy people everywhere. People get harassed or mugged all the time. It’s not pretty.
Now, tech-wise, SF is freaking amazing and you HAVE to go there for a few years if you work in tech. It’s that magical. If you’re a tourist, I’d say avoid it.
Now if you want my opinion, it’s the US that has a huge disparity problem. SF is just the symptom of something much deeper. People are unwilling to see what’s in front of them. When I talk to people in SF or Chicago they tell me that their city is safe and that it has as much homeless as Paris or London. When I hear about prop C which tries to throw more money at the problem, people seem to be against it.