I object to any of the thinking that treats "homeless" as one homogenous group. That's attractive for people who want to argue, but it's useless in actually dealing with real people. We need to divide these people into at least three groups: 

1. Unable to take care of themselves because of things beyond their control, like mental illness, sickness, old age. That's a damn shame. We're the wealthiest society in the world. We used to take care of these people. That changed in the 1980s.
2. People unable to take care of themselves because of substance abuse. Other countries do way better than we do. Give them treatment. Demand that they get it. Treatment, work, or community service. 
3. People who choose homeless as a lifestyle, a choice they make. Put them to work. Community service. Pay them fairly. Fund it by decriminalizing substance abuse, saving money on jails. 

And begging? Outlaw the behavior, not the people. Figure out which individual belongs to which group. Deal accordingly.