[Issue 9924] Handy enum accessors

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 12 05:32:35 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9924



--- Comment #6 from bearophile_hugs at eml.cc 2013-04-12 05:32:33 PDT ---
(In reply to comment #4)

> front() is there to support ranges, it is not a shorthand for [0].

I don't agree. In the last year and half I have written two times by mistake:

return items[$];

instead of:

return items[$ - 1];

Now I usully use this, and avoid the problem, and it works even if later items
becomes a range:

return items.back;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list