Say, for example, you and Steve have the same job description and Steve tells you that he makes $40k more than you. You naturally feel screwed, so you go talk to the boss about it. Now, one of two things might happen. It might turn out that you're actually as good as Steve, and just weren't as good at negotiating. That's the best case, and maybe you'll get yourself the raise that everybody always talks about when this topic comes up.
But more likely, you're just not as good at your job as Steve. And now your boss has no choice but tell you so directly. So now you feel even worse, your boss is uncomfortable, and Steve is all self-conscious.
Your boss has thought all this through, so he put that silly policy in place. (Notice how he loses in either case.) The fact that such a policy exists is probably an indicator that you're not actually as good as Steve (or possibly that Steve isn't as good as you), and that no real good will come from discussing salaries with each other.
If you want to talk salaries, do it with people working at other companies. Figure out your real market rate and if your current employer won't match it, go find somebody who will.
Incidentally, a corollary to the above is that you should avoid working at a place where all salaries are public and they pay all their developers the same, based on a few "tiers" or whatever. Unless you expect you're either bad enough at what you do or bad enough at negotiating that you'd normally end up with a salary below the "tier" level, you're guaranteed to leave money on the table in this situation. Probably about 50% of your actual value if you're genuinely good at what you do and can negotiate your way out of a paper bag.