On Thursday, June 14, 2018 08:40:10 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> On 6/14/18 7:07 AM, Guillaume Piolat wrote:
> > On Tuesday, 12 June 2018 at 15:35:42 UTC, Steven Schveighoffer wrote:
> >> No, that's not what I mean. What I mean is:
> >>
> >> int[] arr = [1,2,3].s;
> >> int
On 6/14/18 7:07 AM, Guillaume Piolat wrote:
On Tuesday, 12 June 2018 at 15:35:42 UTC, Steven Schveighoffer wrote:
No, that's not what I mean. What I mean is:
int[] arr = [1,2,3].s;
int[] arr2 = [4,5,6].s;
Legally, the compiler is allowed to reuse the stack memory allocated
for arr for arr2.
On Tuesday, 12 June 2018 at 15:35:42 UTC, Steven Schveighoffer
wrote:
No, that's not what I mean. What I mean is:
int[] arr = [1,2,3].s;
int[] arr2 = [4,5,6].s;
Legally, the compiler is allowed to reuse the stack memory
allocated for arr for arr2. The lifetime of the arr data is
over.
-Ste
On Tuesday, 12 June 2018 at 16:27:50 UTC, SrMordred wrote:
On Tuesday, 12 June 2018 at 15:39:10 UTC, Steven Schveighoffer
wrote:
Essentially what you had originally was a memory corruption
bug (yes, even before the deprecation happened).
Oops , that bad.
Well, not anymore ;)
On Tuesday, 12 June 2018 at 15:39:10 UTC, Steven Schveighoffer
wrote:
Essentially what you had originally was a memory corruption bug
(yes, even before the deprecation happened).
Oops , that bad.
On 6/12/18 10:57 AM, Guillaume Piolat wrote:
On Tuesday, 12 June 2018 at 14:44:12 UTC, Steven Schveighoffer wrote:
Note to ponce, please update your idioms, this is NOT safe, even
within the same function. Just because it does work, doesn't mean it
will always work. The language makes no guar
On 6/12/18 10:54 AM, Seb wrote:
On Tuesday, 12 June 2018 at 14:35:33 UTC, SrMordred wrote:
this idiom for creating static array used to work, but they are
failing now.
What changed and whats the alternative?
(from
https://p0nce.github.io/d-idioms/#@nogc-Array-Literals:-Breaking-the-Limits)
On Tuesday, 12 June 2018 at 14:44:12 UTC, Steven Schveighoffer
wrote:
What you are being told is that your memory is not being kept
around. Essentially what you had originally was a memory
corruption bug (yes, even before the deprecation happened).
Don't do that anymore!
And a reminder that t
On Tuesday, 12 June 2018 at 14:44:12 UTC, Steven Schveighoffer
wrote:
Note to ponce, please update your idioms, this is NOT safe,
even within the same function. Just because it does work,
doesn't mean it will always work. The language makes no
guarantees once the lifetime is over.
-Steve
On Tuesday, 12 June 2018 at 14:35:33 UTC, SrMordred wrote:
this idiom for creating static array used to work, but they are
failing now.
What changed and whats the alternative?
(from
https://p0nce.github.io/d-idioms/#@nogc-Array-Literals:-Breaking-the-Limits)
T[n] s(T, size_t n)(auto ref T[n]
On 6/12/18 10:35 AM, SrMordred wrote:
this idiom for creating static array used to work, but they are failing
now.
What changed and whats the alternative?
(from
https://p0nce.github.io/d-idioms/#@nogc-Array-Literals:-Breaking-the-Limits)
T[n] s(T, size_t n)(auto ref T[n] array) pure nothro
11 matches
Mail list logo