Arrays, overlapping, etc
Regan Heath
regan at netmail.co.nz
Mon Jul 9 10:15:19 PDT 2007
Vladimir Panteleev wrote:
> On Mon, 09 Jul 2007 11:31:25 +0300, Regan Heath <regan at netmail.co.nz>
> wrote:
>
>> The next point is that surely an overlapping copy can be
>> implemented/handled? I had a quick look in Bugzilla and found a
>> couple of of items the topic and related topics. One even suggests
>> documenting the various methods you can use to get around the
>> deficiency.
>
> The main reason for overlapping copy being forbidden is because
> forbidding it makes normal array operations much faster - the
> compiler doesn't have to check for overlaps each time an array
> (slice) is copied.
Isn't it already checking? I mean, it has to be in order to give the
exception "overlapping array copy", right?
> I made a suggestion some time ago to make the
> compiler allow overlapping copy when it's obvious that you're doing
> it (copying a slice of one array onto itself). No one has yet
> discussed implementing it as a separate language feature, though.
I dont want a seperate language feature. I just want it to work.
Regan
More information about the Digitalmars-d
mailing list