[Issue 11213] Simplify switch case-range statement

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 10 03:32:09 PDT 2013


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


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #5 from bearophile_hugs at eml.cc 2013-10-10 03:32:08 PDT ---
(In reply to comment #4)

> As an enhancement, I don't see why
> 
> case 0 : .. case 4 :
> 
> couldn't also be:
> 
> case 0 .. 5;
> 
> If anything, "case 0 .. 5" is more consistent with what the language does
> *everywhere*else*, and "case 0 : .. case 4 :" is the actual artifact that never
> should have existed.

This introduces the problem that we'll need to solve adding "[]" to iota:

iota!"[]"(ubyte.min, ubyte.max)

So Kenji is right.

-- 
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