On Saturday, December 10, 2011 06:38:19 Adam wrote:
> Okie, having some trouble trying to do matches against classes /
> interfaces with templates using the std.concurrency's receive()
> function.
>
> Here's a simple use case I have:
>
> import std.stdio;
> import std.concurrency;
> import std.va
Okie, having some trouble trying to do matches against classes /
interfaces with templates using the std.concurrency's receive()
function.
Here's a simple use case I have:
import std.stdio;
import std.concurrency;
import std.variant;
immutable interface BasicType {
}
immutable class SubType : B
On 12/09/2011 02:58 PM, Jonathan M Davis wrote:
> On Friday, December 09, 2011 14:33:38 Ali Çehreli wrote:
[...]
>> That's news to me. Don't the static array elements belong to the
>> runtime, managed by the garbage collector, and will be kept alive as
>> long as the slice is alive?
>
> Goodness n
On Friday, December 09, 2011 14:33:38 Ali Çehreli wrote:
> On 12/09/2011 01:18 PM, Jonathan M Davis wrote:
> > On Friday, December 09, 2011 22:09:15 Timon Gehr wrote:
> >> On 12/09/2011 09:32 PM, Ali Çehreli wrote:
> >>> So it is impossible to do anything shallow with them unless we
> >>> explicitl
On 12/09/2011 01:18 PM, Jonathan M Davis wrote:
> On Friday, December 09, 2011 22:09:15 Timon Gehr wrote:
>> On 12/09/2011 09:32 PM, Ali Çehreli wrote:
>>> So it is impossible to do anything shallow with them unless we
>>> explicitly maintain a pointer to a fixed-length array ourselves.
>>>
>>> Al
On Friday, December 09, 2011 22:09:15 Timon Gehr wrote:
> On 12/09/2011 09:32 PM, Ali Çehreli wrote:
> > So it is impossible to do anything shallow with them unless we
> > explicitly maintain a pointer to a fixed-length array ourselves.
> >
> > Ali
>
> You can always slice it, of course
>
> int[
On 12/09/2011 09:32 PM, Ali Çehreli wrote:
On 12/08/2011 12:52 PM, Timon Gehr wrote:
> On 12/08/2011 09:50 PM, RenatoL wrote:
>> snippet 1)
>> auto arr1 = [1,2,3];
>> auto arr2 = arr1;
>> arr1[1] = 22;
>> arr2[2] = 33;
>> foreach (i; 0..arr1.length) write(arr1[i], " ");
>> writeln();
>>
On 12/08/2011 12:52 PM, Timon Gehr wrote:
> On 12/08/2011 09:50 PM, RenatoL wrote:
>> snippet 1)
>> auto arr1 = [1,2,3];
>> auto arr2 = arr1;
>> arr1[1] = 22;
>> arr2[2] = 33;
>> foreach (i; 0..arr1.length) write(arr1[i], " ");
>> writeln();
>> foreach (i; 0..arr2.length) write(arr2[i], " ");
>>
>