Closed numberten closed 10 years ago
I think we may want to reconsider this. There is definitely a use case for having an unknown nick's cluster be itself. For instance, when integrating with grep we consider all of the nicks in the given nick's cluster. It would be odd and lead to unexpected behavior if a given nick was not in it's own cluster.
You're referring to the case where a nick is in the history but not in a nickcluster? Possibly after being manually removed?
Yes.
It still seems kind of weird, even with this case where it might save lines of code. Returning the unknown nick doesn't give the caller any information other than representing failure. If it were changed to return Maybe [Nicks], the component could still make use of its argument (in this example unknown-nick) in the Nothing case.
Functionally they're the same, but in my opinion representing failure with Nothing is more elegant than forcing the component implementer to explicitly check to see if aliasesForNick
returned its own argument.
!alias <nick that doesn't exist>
returns that alias as if it were in its own cluster. ex: