Range Type
Janice Caron
caron800 at googlemail.com
Mon Mar 24 08:37:01 PDT 2008
On 24/03/2008, sambeau <sambeau-nospam at mac.com> wrote:
> And now I need to think whether ranges are the only interesting exceptions to const that we need to consider.
It's not an exception to const.
> For instance.. CONS? Could we safely make a new const array by concating two constant arrays together? And if so is there any need for this? I can see that it would just another ay of doing COW, but could the compiler apply interesting optimisations (and paralellisations) from this knowledge?
You may perhaps have misunderstood the proposal. The type T..U is
sugar for struct { T begin; U end; }, that's all. The value x..y is
just an instance of typeof(x)..typeof(y). There's no array magic going
on whatsover. You'd use ranges to /slice/ arrays, that's all.
More information about the Digitalmars-d
mailing list