"ich hab noch nicht mit dem gesprochen"
I heard this sentence earlier and wondered why "dem" translates to "him"
mit is dative therefore it should be "ihm"?
Can somebody explain this please?
mit dem (with no noun to follow) literally translates "with that one", where "that one" is either masculine or neuter.
Ich bin dem begegnet.
I met that guy. / I met that one.
Ich bin ihm begegnet.
I met him.
As is the case in English, mit dem (with that guy / with that one) is used to refer back to an entity not held in high regard. In some contexts, however, it has come to replace mit ihm, most probably due to ease of pronunciation. But this construction still predominantly holds for informal speech when talking about persons. You may freely apply it, though, whenever you talk about things, actions, or basically anything not animate:
Ich habe mich dem gewidmet. (dem comes from das here, not from der.)
I spent time on that thing / that one / that.
Ich habe mich mit dem begnügt.
I contented myself with that thing / that one / that.