Using digital pins as GND

sounds like a big pain in the butt over running one common line, how do you expect to detect changes in the switch if your pins are all switching themselves?