Open rebolbot opened 15 years ago
Submitted by: BrianH
Typesets are like bitsets for types, so their contents are already and always unique. This operation would always return true. It's a noop, and would only be included for coverage.
Submitted by: meijeru
I see your point, the internal storage is always unique -- I was thrown by the observed duplication of types in function specs (that is purely on the text level)
but.. continuing this reasoning, unique should not be defined on bitsets either, or should it ;-)
Submitted by: BrianH
Noops aren't necessarily a bad thing, but that is something we need to consider as well. I don't see the harm in including it, especially if UNIQUE is considered one of a set of functions that could be supported as a group.
Submitted by: Ladislav
My preference is to exclude the noops in this case, since they may become a source of confusion for newcomers. (Why don't they work?)
Submitted by: Carl
This is an interesting question, isn't it? At first, I agreed with Ladislav that a beginner could be confused. But, how many new users will be doing data-set operations on things like typesets? Very few.
I think no-ops are useful if they help minimize code, especially in abstract higher-level functions. To allow UNIQUE as a no-op means that the implementer does not need to special case the code when a bitset or typeset is provided. The right thing will happen.
Therefore, I will support the request. It is added.
Submitted by: meijeru
CC - Data [ Version: alpha 54 Type: Wish Platform: All Category: n/a Reproduce: Always Fixed-in:alpha 55 ]