On 17/02/14 06:02, Jürgen Hestermann wrote:
Am 2014-02-16 17:16, schrieb Michael Van Canneyt:
It does exactly that, it says:
1) No COW
As said already: SetLength *is* a write!
I'm not of compiler background - but I think you're confusing things here.
To 'write' usually means :
On Mon, 17 Feb 2014, Lukasz Sokol wrote:
On 17/02/14 06:02, Jürgen Hestermann wrote:
Am 2014-02-16 17:16, schrieb Michael Van Canneyt:
It does exactly that, it says:
1) No COW
As said already: SetLength *is* a write!
I'm not of compiler background - but I think you're confusing
Am 2014-02-17 10:38, schrieb Lukasz Sokol:
To 'write' usually means : changing DATA element(s). That's it.
What else is it when adding or removing elements? The array is modified. That
can only mean it was written to it.
SetLength is /not/ a write in this sense : because you're resizing the
On 17/02/2014 16:40, Jürgen Hestermann wrote:
Am 2014-02-17 10:38, schrieb Lukasz Sokol:
To 'write' usually means : changing DATA element(s). That's it.
What else is it when adding or removing elements? The array is
modified. That can only mean it was written to it.
SetLength is /not/ a
On 17/02/2014 16:40, Jürgen Hestermann wrote:
But changing the size it is a modification! When an array can be
resized then the resizing means that I have to write to it (in
contrast to reading, where no data is modified). I am astonished that
everybody here seems not to see this. Maybe
On 04/02/2014 13:45, Sven Barth wrote:
Am 04.02.2014 11:35, schrieb Constantine Yannakopoulos:
I tried to compile FPC from source using FPCUP with its default
options using the latest trunk code but it failed to compile LCL,
probably due to Unicode changes. Could you tell me what is the most
Am 2014-02-17 18:01, schrieb Martin Frb:
On 17/02/2014 16:40, Jürgen Hestermann wrote:
It appears, that the copy-on-setlength is intended. So in that the
documentation is right.
It is intended but is was not mentioned in the documentation.
Therefore this whole thread exists at all.
As for
On 17/02/2014 17:28, Jürgen Hestermann wrote:
Am 2014-02-17 18:01, schrieb Martin Frb:
On 17/02/2014 16:40, Jürgen Hestermann wrote:
It appears, that the copy-on-setlength is intended. So in that the
documentation is right.
It is intended but is was not mentioned in the documentation.
Am 2014-02-17 18:49, schrieb Martin Frb:
Then why does this discussion continue, now that it is documented?
Does it matter what other people consider a write and what not? (Unless that
part made it into the docs, but there was no mention it did)?
Of course it would not matter if it wasn't
On 17 Feb 2014, at 19:19, Jürgen Hestermann wrote:
And I have not seen what change was made to the documentation.
svn co http://svn.freepascal.org/svn/fpcdocs/trunk
It's the same as when something is fixed in FPC: this does not change anything
to the latest release, which is what's available
On 17/02/2014 18:19, Jürgen Hestermann wrote:
Am 2014-02-17 18:49, schrieb Martin Frb:
Then why does this discussion continue, now that it is documented?
Does it matter what other people consider a write and what not?
(Unless that part made it into the docs, but there was no mention it
did)?
In our previous episode, Martin Frb said:
Just because there is a function, that includes copying (when modifying
the array), does not mean there is copy on write.
So basically, if for a given size x, setlength(x,1) always reallocates, then
it is COW, otherwise not :-)
(and even if it does,
On 17/02/2014 19:34, Marco van de Voort wrote:
In our previous episode, Martin Frb said:
Just because there is a function, that includes copying (when modifying
the array), does not mean there is copy on write.
So basically, if for a given size x, setlength(x,1) always reallocates, then
it is
On 17 Feb 2014, at 20:41, Martin Frb wrote:
Dynamic arrays have no copy-on-write. But SetLength perform a copy-on-write
on dynamic arrays.
I am not sure, if that makes to much sense either
It doesn't, because even if you don't change the length it makes a unique copy.
Jonas
On 17/02/2014 19:50, Jonas Maebe wrote:
On 17 Feb 2014, at 20:41, Martin Frb wrote:
Dynamic arrays have no copy-on-write. But SetLength perform a copy-on-write on
dynamic arrays.
I am not sure, if that makes to much sense either
It doesn't, because even if you don't change the length it
Am 16.02.2014 14:07, schrieb Jürgen Hestermann:
When using unknown features of a programming language for the first time
then the documentaion should tell all aspects in detail and describe the
exact behaviour.
No. Details might be implementation specific behaviour which might change.
Am 16.02.2014 17:16, schrieb Michael Van Canneyt:
2) SetLength enforces unique ref. count.
I'am against stating this in the docs. It is an implementation detail.
The proper way to do a deep copy is using copy.
___
fpc-pascal maillist -
On 17/02/2014 20:10, Florian Klämpfl wrote:
Am 16.02.2014 17:16, schrieb Michael Van Canneyt:
2) SetLength enforces unique ref. count.
I'am against stating this in the docs. It is an implementation detail.
The proper way to do a deep copy is using copy.
IMHO, it must be documented, even if
In our previous episode, Martin Frb said:
the array), does not mean there is copy on write.
So basically, if for a given size x, setlength(x,1) always reallocates, then
it is COW, otherwise not :-)
That came out wrong wrong. Should've been for given x, setlength(p,x+1); p
(after) is
19 matches
Mail list logo