On Saturday, 20 September 2014 at 21:05:12 UTC, Nordlöw wrote:
On Saturday, 20 September 2014 at 20:43:28 UTC, bearophile wrote:
In D currently that "int[I]" is an associative array with I index and int values. So in another post I have suggested another syntax.

Couldn't we simply add an optimization pass that CT-introspects the enumerators of an enum-indexed AA and represent it internally as a lookup-table if the enumerator values are adjacent (enough)?

Further it would be nice if the newly added std.range.enumerate got support for Enumerator being an enum when instantiated with an enum-indexed array.

Currently it fails, for starters, because the default value of second parameter

    Enumerator start = 0

should be

    Enumerator start = Enumerator.min

in the case when Enumerator is an enum.

Reply via email to