Idiomatic way to process const/immutable arrays as ranges

Jonathan M Davis jmdavisProg at gmx.com
Mon Feb 11 08:53:41 PST 2013


On Monday, February 11, 2013 17:42:13 Dicebot wrote:
> On Monday, 11 February 2013 at 16:25:35 UTC, Dmitry Olshansky
> 
> wrote:
> > I might be wrong but you can slice it e.g.:
> > 
> > args[].join(" ");
> 
> [], as well as [0.$] does return the very same qualified slice,
> have tried it.

For arrays, [] returns a tail-const slice of the array. If it doesn't, it's a 
bug.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list