I... don't know.
Saudi Arabia want's to build a city: 170km long, 200m wide, 500m tall:
The Line, Neom City
It might be worth it if it also keeps the White Walkers out.
If the goal is to reduce the impact on the environment, then isn't a straight line one of the worst shapes?
It depends what environmental impact problem they're trying to solve. If it turns out that an extremely long, narrow urban core is a much more energy-efficient way to house, supply, and employ hundreds of thousands of people, that might mean a lot less contribution to global climate change from energy production, even if if it leaves the local ecosystem somewhat less "pristine" than other city footprints.
Eh, the problem I have with that solution is that when they start breaking through the wall they're breaking into my living room.
I guess it would be functionally equivalent to building an urban corridor along a rail line. One advantage might be needing only a single easement for all your major transportation and supply infrastructure, One highway, one waterway, one railway, one power line, etc.
So this would let you have one main train line running back and forth the length of the city. You'd be able to access a station almost anywhere with just an elevator ride and a short walk. The biggest complexity might be short-distance vs. long distance trains. Have a local train with stops every 200m or so, and an express train with stops maybe 2 to 5km apart. You'd only have to do a transfer if you were planning on going a long way, or wanted to get there quickly.