That's the only result. I've been on both sides of the fence. People bring different skills, value, and opportunity to a company. People are hired at different times under different circumstances.
Knowing each others salaries only causes people to be unhappy and general discord in the workforce.