handful and interval
Jacob Carlborg
doob at me.com
Sun Sep 2 07:51:55 PDT 2012
On 2012-09-02 16:22, Andrei Alexandrescu wrote:
> I'd like to add a simple function to std called "handful". It would
> return a small, read-only set of which main facility is membership test:
>
> string a = "class";
> if (a in handful("struct", "class", "union"))
> {
> ...
> }
>
> Would it be generally useful, and if so what module does it belong to?
I really don't like the name "handful". What would be the difference
compared to a regular set container? To me it sounds like we should have
a standard set container in Phobos, std.container.set.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list