I know this is probably not a practical everyday use example but for instance:

I've coded an IRC Server in mIRC Script for testing purposes and when a client connects to the scripted server i assign the new connection a temp name e.g.
var %a = $+(Serv.Client.,$ticks)
sockaccept %a
I then create a hash table to store info about the new client.
hmake %a 10
hadd %a ip $sock(%a).ip
When the client sends the first nick command I then rename the client's socket to $+(Serv.Client.<nickname>)
It would therefor be useful to simply rename the hash table to $sockname which is Serv.Client.Nickname

This is my example however i'm sure there are other irc (client) related examples as well.

mIRC Scripting: So easy a caveman could do it.