Why I Use D

bearophile bearophileHUGS at lycos.com
Sun Mar 30 04:48:43 PDT 2008


Scott S. McCoy:
> I'll take a second to plug my thoughts on array slicing.
> array[..] should be synonymous with array[0..$]

You can already do that: array[]

> array[5..] should be synonymous with array[5..$]/array[5..length]
> array[..5] should be synonymous with array[0..5].

That's equal to Python, where you can write: array[5:] array[:5]
Something very close is possible in Haskell too.

Bye,
bearophile



More information about the Digitalmars-d mailing list