On 5/6/2014 6:46 PM, Rene Zwanenburg wrote:
On Tuesday, 6 May 2014 at 02:17:06 UTC, Nick Sabalausky wrote:
So all is well, and deliberately so. Pardon the noise.
IMO it's not. I once had a particularly nasty bug because of this:
struct S
{
@safe:
string str;
this(string data)
On Wed, May 07, 2014 at 06:31:15PM +, Rene Zwanenburg via
Digitalmars-d-learn wrote:
On Wednesday, 7 May 2014 at 15:41:19 UTC, Nick Sabalausky wrote:
On 5/6/2014 6:46 PM, Rene Zwanenburg wrote:
[...]
struct S
{
@safe:
string str;
this(string data)
{
import
On Mon, 05 May 2014 22:16:58 -0400
Nick Sabalausky via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On 5/5/2014 10:11 PM, Nick Sabalausky wrote:
Is this kinds stuff a sane thing to do, or does it just work by
accident?:
void modify(ubyte[] dynamicArr)
{
On Tue, May 06, 2014 at 01:06:14AM -0700, Jonathan M Davis via
Digitalmars-d-learn wrote:
On Mon, 05 May 2014 22:16:58 -0400
Nick Sabalausky via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On 5/5/2014 10:11 PM, Nick Sabalausky wrote:
Is this kinds stuff a sane thing to
H. S. Teoh:
Exercise for the reader: spot the bug.
https://issues.dlang.org/show_bug.cgi?id=5212
https://issues.dlang.org/show_bug.cgi?id=11657
Bye,
bearophile
On Tuesday, 6 May 2014 at 02:17:06 UTC, Nick Sabalausky wrote:
So all is well, and deliberately so. Pardon the noise.
IMO it's not. I once had a particularly nasty bug because of this:
struct S
{
@safe:
string str;
this(string data)
{
Is this kinds stuff a sane thing to do, or does it just work by accident?:
void modify(ubyte[] dynamicArr)
{
dynamicArr[$-1] = 5;
}
void main()
{
ubyte[4] staticArr = [1,1,1,1];
modify(staticArr);
assert(staticArr == [1,1,1,5]);
}
On 5/5/2014 10:11 PM, Nick Sabalausky wrote:
Is this kinds stuff a sane thing to do, or does it just work by accident?:
void modify(ubyte[] dynamicArr)
{
dynamicArr[$-1] = 5;
}
void main()
{
ubyte[4] staticArr = [1,1,1,1];
modify(staticArr);
assert(staticArr == [1,1,1,5]);