system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:Are diesel cars better or worse for the environment than petrol cars?

As I understand it, diesel is worse for the local environment as they cause more air pollution. So if all the cars in your city use diesel, you will have lower air quality than if all the cars in your city used petrol.

On the other hand, diesel cars have better mileage than petrol and so contribute less to climate change. 

Netting these two factors, are diesel cars greener than petrol ones?
gpt
It is an ongoing debate whether diesel or gasoline causes more pollution.  

Diesels often seem to cause more pollution, as they release more of the visible pollutants, like NOx and soot.  However, they release fewer hydrocarbons and carbon monoxide, things you can't see as easily.  They also don't release lead, which is less of concern in places that mandate unleaded gasoline.