Re: foreach, is and pointer
On 26/03/2017 7:52 AM, helxi wrote: What's the difference between 1. string x = "abcd"; foreach(character; x) write(character); and string x = "abcd"; foreach(character; x[0..$]) write(character); Hopefully the compiler is smart enough to ignore that slice (since its
foreach, is and pointer
What's the difference between 1. string x = "abcd"; foreach(character; x) write(character); and string x = "abcd"; foreach(character; x[0..$]) write(character); 2. is and == 3. pointer and address and reference?