1.

Why Doesn't The Case Range Statement Use The Case X..y: Syntax?

Answer»

The usages of .. WOULD then be:

  1. case X..Y:
  2. foreach(e; X..Y)
  3. array[X..Y]

Case (1) has a VERY DIFFERENT meaning from (2) and (3). (1) is inclusive of Y, and (2) and (3) are EXCLUSIVE of Y. Having a very different meaning means it should have a distinctly different syntax.

The usages of .. would then be:

Case (1) has a VERY DIFFERENT meaning from (2) and (3). (1) is inclusive of Y, and (2) and (3) are exclusive of Y. Having a very different meaning means it should have a distinctly different syntax.



Discussion

No Comment Found