The poster you're replying to is using rehabilitation in the "correct this person's future behavior" sense.
> lock up a heroin dealer
The problem is that nearly 3/4 of all prisoners end up back in prison within 5 years [0]. Locking people up isn't changing their behavior. Locking up a heroin dealer isn't keeping them from dealing heroin once they get out.
So, either we need to lock people up indefinitely (which costs $$$ even if you're not swayed by the humanitarian arguments), or we need to figure out something more effective than trying to hammer our square peg (prison) through this round hole (reducing criminal behavior).
0: http://www.nij.gov/topics/corrections/recidivism/pages/welco...