I've found infinitive, bare infinitive and gerund. For example
He did more than ask questions.
It's better to ask than to assume.
Going to work is often better than going to class.
It's a better choice than going to hostel.
What is the rule to determine which form is suitable?