An idea: only use URL fragments as an implementation detail
There are a number of awkward things about URL fragments, including that they commit you to a certain implementation of your page structure if you are going to provide cool URLs. At the same time, I believe that they're the only way to make a reference to a part of a page, so they're pretty essential if you want to aggregate information on a page but still be able to point to specific bits.
For example, WanderingThoughts uses URL fragments to point to the comments on a specific entry and to point to specific comments; as a deliberate decision, comments only get shown all together and with the entry itself. As usual when software uses fragment identifiers, the URLs that DWiki to point to a page's comments or a specific comment directly include the URL fragment itself.
The more I think about this, the more I think that it is a mistake.
URLs that appear in browser address bars are public, but URLs that
<a href>s are even more public, and that's not what I should
be encouraging with URL fragments.
My current idea on the way out is to make the official URLs for these things be synthetic regular URLs in some appropriate format, and have these synthetic URLs generate HTTP redirects to the actual URL fragment version. This tries to turn the URL fragment itself into as much of an implementation detail as possible, so you can later change things and have at least some URLs keep working.
On the other hand, this might be an unnecessary complication given that it doesn't completely solve the issue, since people will still see the fragment in the URL when they get to the actual page (and bookmark it and so on).