I didn’t mean to imply that denser housing was being built illegally, only that the availability of it is a product of zoning codes forbidding it in most places. I don’t expect dollars per square foot to scale linearly in either case, and in my personal experience, when I ran the numbers about 7 years ago, moving from suburbia to a dense city ended up costing me almost exactly the same, because I no longer need a car here. You think differently about how much space you actually need when your social space is no longer a back yard or a living room and is instead a park or a nearby bar or something.