I was just reading this post here:
What are circular symlinks in Unix-like systems used for?
And the answers were quite interesting. They seem to say conclusively that there is no reason one would ever create such a circular symlink, and therefore it must have been created in error. If this is true, then why on earth are they allowed? Is it because the mechanics of disallowing them are prohibitively complicated or computationally intensive?
I don't see why this would be the case: can't we just compare the address in memory to see if it is the same as the target address, and then if they are the same, throw an error?
EDIT: perhaps in certain languages there will be an error unless you use some sort of forcing option. In those cases, then my question simply becomes: why would you allow a force option?
EDIT: upon some further research with the help of @Wumpus Q Wembley, it appears that this is indeed disallowed in unix and results in the following error:
ln: ‘/usr/bin/apt-config’ and ‘/usr/bin/apt-config’ are the same file
but that this can indeed happen when the files that are being symlinked to themselves are already symlinks from some other file. I'm not sure why that behavior is desirable?
-Paul