I'm almost ready to release Queue as a FSharpx.Collections immutable data structure. I implemented the common and accepted names for queue operations (peek/enqueue/dequeue), and I'm very dissatisfied with them:
1) enqueue/dequeue...I always have to stop and think what they mean. They both have the root "queue".
2) dequeue...used for 2 different operations: one returns just the tail, and the other returns a tuple of next element and tail. F# doesn't allow overloading of non-static type member or of module functions so combining these operations in a .NET-like way would be difficult (aside from the bad practice of naming different operations the same).
3) Double-ended queue is a different data structure I intend to implement...currently named "Deque" (notice lacking 2nd "ue") after Okasaki's naming standard. Another source of confusion with a "dequeue" action on queue.
Argument for sticking with "Okasaki" naming standard (cons/head/tail/snoc) supplemented by "uncons":
1) List is the most ubiquitous of all functional structures and already sets the standard for cons/head/tail. There are other "list-like" structures (random access list, double-ended queue, vector, difference list, queue, and heap, among others). Why not name functions the same across entire classes of structure rather than ad hoc names for each structure?
(Admittedly "snoc" is an odd name, but "append" is already taken for some list-like structures by another operation. I can't think of an alternative to "uncons", but I'm open to suggestions.)
I'm open to sticking with "common and accepted" names, but so far the only argument in their favor is they are "common and accepted names", which is usually a sufficient argument, but I think in this case not.
Looking for suggestions.