... Make use of the airspace.
I wouldn't say that this was a common sight in Rome, but I saw it on a few occasions in various parts of Italy.
Italy's population density is about 200 people per square km, reputedly placing it about 62nd in the world. Australia in contrast is in position 235 with 3.3 per sq km but we have bleeping great tracts of uninhabitable desert amongst our sq kms.
One solution to the lack of space is to build air bridges between buildings (long before they were known as that) and put some living space into them.
We see that in action here as the sun warms these antique buildings. I don't imagine the road underneath would be all that busy even when it's not a Sunday morning; I could imagine having a study in a room like one of these, looking out over the street as I write. I would hopefully produce something a bit more literary than the drivel that I put in my photo comments, but it would probably end up being Java code or something instead.