Constructing web accessible links to posts and topics programmatically

I often see domain/t/-/topic_id/post_id. Is one preferred?