On Wednesday, 7 May 2014 at 20:09:22 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
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:
[...]
>>st
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)
> >>
On Wednesday, 7 May 2014 at 15:41:19 UTC, Nick Sabalausky wrote:
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
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 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)
{
im
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 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
> 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
On Mon, 05 May 2014 22:16:58 -0400
Nick Sabalausky via Digitalmars-d-learn
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)
> > {
> > dynamicArr[$-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]);
}