I don’t recall seeing these conversations, but I’d like to see something happen in that area. Really, I’d like an operator (e.g. …
) in the standard library that would allow for
animals.uniqued()…(.init)
but even though that’s good for the general case, it doesn’t read as well as a method that performs a subset of such an operator’s job.
collect
is better than toArray
, because e.g. Array
is to Sequence
as String
is to Substring
. The method, which should be added to all applicable types, should have a universal name.
In the graphics world, we’d call this method baked
.
In the audio world, frozen
.
There are probably many others for other domains.
Is collect
the domain-independent word for bake
and freeze
?