Come January, a new mayor of New York will take office with the city facing a bad budget forecast: cloudy, chilly, with a chance of apocalypse.

You wouldn’t know this by following the candidates around now. They’re out campaigning on the sunny side of the street — a place where, to hear them tell it, thousands of new police officers will soon be on patrol, tens of thousands of dilapidated public-housing units are about to be swiftly repaired and new affordable apartments built, and children will one day be heading off to their universal prekindergarten classes, getting a head start on life in a greener, safer, sturdier city in which the middle class and the City University are resurgent, jobs and services are abundant, and there’s money to cover all needs.

Those visions are seductive; they’re supposed to be. Politicians don’t get elected by predicting failure and doom.

But doom can happen, especially when unrealistic promises meet dismal facts like these: a $2 billion gap in the city’s $70 billion budget; huge and steadily growing pension obligations and health care costs for city workers; middling economic growth; the unexpected and continuous costs of disasters like Hurricane Sandy. One burden is the contracts covering 300,000 workers in nearly every municipal union. Mayor Michael Bloomberg let them all expire years ago, and they have not been renegotiated. The unions haven’t had raises in recent years, and they are expecting the next mayor to hand over nearly $8 billion in retroactive pay. That is more than the city’s annual operating budgets for police, fire and corrections combined.