You should read about Switzerland's policy on heroin. Special clinics, perscriptions, available clean needles everywhere, professional staff (and AFAIR many members of public facing professions) medically trained to perform injections in case an addict needs one but isn't phisically able to do it himself, etc. Somebody who knows better can probably expand on the details, but there's a complex multi-layer policy on drugs, from prevention and harm reduction to quality control.
Ironically, smoking joints is technically illegal and the latest try to do it didn't pass the referendum, however, the fines aren't that drastic according to wiki https://en.wikipedia.org/wiki/Cannabis_in_Switzerland