Slow cooking with diet coke
We've slow cooked gammon in (full sugar) coke before, and what happens is that all the CO2 comes out in the first few minutes as it comes up to temperature. So if you start (as we do and most recipes suggest) by bringing the cooking liquid to the boil the foaming will happen while you're standing over it. 

This makes sense as gases are less soluble in hot liquids than cold; in fact I've used heating in the lab to drive off dissolved gas. 

Most of the sugar is poured away in the cooking liquid, so there's not much benefit (in terms of calories) from using diet. If you plan to finish the gammon off with direct heat for browning, sugary coke is likely to give a nicer finished item (colour, flavour and smell). Some sweeteners go bitter when cooked too hot (and the reaction products may not be good to eat), while sugar caramelises.