Hastings = Bad.
Pender = Good.
It's a question that comes up frequently on Vancouver travel forums. Despite the countless warnings and words of advice, way too many visitors end up walking down Hastings to get to Chinatown. They are often found complaining about it after on sites like TripAdvisor. Then there are others who don't even make it to Chinatown. Upon venturing too far down Hastings, they turn around after encountering what they must think is a zombie apocalypse.
Hastings is a long street spanning 13 km (8 miles) from the luxurious Coal Harbour condos overlooking Stanley Park all the way east to the foot of SFU campus on Burnaby Mountain. Most of it's completely fine. In fact, Hastings is rather upscale through most of downtown Vancouver. Chanel has a boutique on Hastings & Hornby, for example. And outside of downtown it's a major commercial strip, including an up and coming neighbourhood.
But as you head east down Hastings from downtown, it does get more seedy and sketchy, especially once you get to the few blocks around Main Street where it's downright depressing, smelling of urine, and lots - and by that, hundreds - of drug addicted, mentally ill, and homeless people on the sidewalks. It's not a violent place and in all honesty, if you were to walk through there, you'd likely be ignored by the people hanging around there, but the biggest tip I can give you is to NEVER take Hastings to get to Chinatown.
Take Pender Street instead.
You can walk down Hastings to Abbott Street. Once at Abbott it's probably best to walk the block south to Pender and continue east down Pender. It's just after Pender and Abbott when you enter Chinatown - that's where the Chinatown gates are located.
Note that aside from the Chinatown Night Market, Chinatown is otherwise not a very vibrant place to be at by evening/night as most stores are closed, locked, and gated. It's best to visit in the morning or afternoon.
So if you're going to walk to Chinatown from downtown, do yourself a favour and take Pender Street.