On 17.12.2013 15:36, Marco Leise wrote:
Now similarly I would prefer if among() could do anything else but shift indexes by +1. Indexes in D are 0 based. Since we are talking about a verbatim set of options here instead of a linear string, I could live with -1 as "not in list" and a zero based index, but then among would have to be renamed to something that doesn't imply a result that converts to boolean. "optionIndex" or something.
findAmong? I find 'among' ambiguous - both a boolean result and an index result would fit the name, IMO.
-- Simen
