I don't think the fact that it sometimes works out well means that it's generally a good idea. Relationships probably end in breakup as often as not, and then you're left in the awkward position of still needing to go to class (or to work) with your ex as your "superior."