On Monday, 27 February 2012 at 19:34:45 UTC, Robert Rouse wrote:
Which thing? Delegates can already access variables outside,
because that's what they are for.
The »returning from block returns from outer function« part.
Also applies to similar control statements.
David
On Monday, 27 February 2012 at 14:57:56 UTC, Ary Manzana wrote:
On 2/25/12 10:04 PM, Robert Rouse wrote:
On Saturday, 25 February 2012 at 23:10:51 UTC, Ary Manzana
wrote:
On 2/25/12 7:31 PM, Robert Rouse wrote:
On Saturday, 25 February 2012 at 22:12:55 UTC, Ali Çehreli
wrote:
On 02/25/2012
On 2/25/12 10:04 PM, Robert Rouse wrote:
On Saturday, 25 February 2012 at 23:10:51 UTC, Ary Manzana wrote:
On 2/25/12 7:31 PM, Robert Rouse wrote:
On Saturday, 25 February 2012 at 22:12:55 UTC, Ali Çehreli wrote:
On 02/25/2012 01:55 PM, Robert Rouse wrote:
On Saturday, 25 February 2012 at 1
On 2012-02-27 00:04, Ali Çehreli wrote:
On 02/26/2012 03:45 AM, Jacob Carlborg wrote:
> On 2012-02-26 11:03, Ali Çehreli wrote:
>> On 02/25/2012 05:04 PM, Robert Rouse wrote:
>> > On Saturday, 25 February 2012 at 23:10:51 UTC, Ary Manzana wrote:
>> >> On 2/25/12 7:31 PM, Robert Rouse wrote:
On 02/26/2012 03:45 AM, Jacob Carlborg wrote:
> On 2012-02-26 11:03, Ali Çehreli wrote:
>> On 02/25/2012 05:04 PM, Robert Rouse wrote:
>> > On Saturday, 25 February 2012 at 23:10:51 UTC, Ary Manzana wrote:
>> >> On 2/25/12 7:31 PM, Robert Rouse wrote:
>>
>> ...
>>
>> >>> This means that D can simu
On 2012-02-26 11:03, Ali Çehreli wrote:
On 02/25/2012 05:04 PM, Robert Rouse wrote:
> On Saturday, 25 February 2012 at 23:10:51 UTC, Ary Manzana wrote:
>> On 2/25/12 7:31 PM, Robert Rouse wrote:
...
>>> This means that D can simulate Ruby blocks more than I thought. That's
>>> pretty awesom
On 02/25/2012 05:04 PM, Robert Rouse wrote:
> On Saturday, 25 February 2012 at 23:10:51 UTC, Ary Manzana wrote:
>> On 2/25/12 7:31 PM, Robert Rouse wrote:
...
>>> This means that D can simulate Ruby blocks more than I thought. That's
>>> pretty awesome. I'm loving D more every day.
>>
>> How's t
On 2/25/12, Ali Çehreli wrote:
> Apparently template parameters
> with default values need not be at the end of the template parameter list
Well it would make variadic templates rather hard to use if this was illegal:
void print(bool pretty = false, T...)(T args) { }
void main() { print(1, "two"
On Saturday, 25 February 2012 at 23:10:51 UTC, Ary Manzana wrote:
On 2/25/12 7:31 PM, Robert Rouse wrote:
On Saturday, 25 February 2012 at 22:12:55 UTC, Ali Çehreli
wrote:
On 02/25/2012 01:55 PM, Robert Rouse wrote:
On Saturday, 25 February 2012 at 18:54:35 UTC, Trass3r wrote:
void foo(T,
On 2/25/12 7:31 PM, Robert Rouse wrote:
On Saturday, 25 February 2012 at 22:12:55 UTC, Ali Çehreli wrote:
On 02/25/2012 01:55 PM, Robert Rouse wrote:
On Saturday, 25 February 2012 at 18:54:35 UTC, Trass3r wrote:
void foo(T, T2, alias thing = (){})(T a, T2 b)
{
thing();
}
void bar(){}
void
On Saturday, 25 February 2012 at 22:12:55 UTC, Ali Çehreli wrote:
On 02/25/2012 01:55 PM, Robert Rouse wrote:
On Saturday, 25 February 2012 at 18:54:35 UTC, Trass3r wrote:
void foo(T, T2, alias thing = (){})(T a, T2 b)
{
thing();
}
void bar(){}
void main()
{
foo!(int,int,bar)(1,2);
foo(1,2)
On 02/25/2012 01:55 PM, Robert Rouse wrote:
On Saturday, 25 February 2012 at 18:54:35 UTC, Trass3r wrote:
void foo(T, T2, alias thing = (){})(T a, T2 b)
{
thing();
}
void bar(){}
void main()
{
foo!(int,int,bar)(1,2);
foo(1,2);
}
Cool. Didn't know you can do that, but I guess it makes sense t
On Saturday, 25 February 2012 at 18:54:35 UTC, Trass3r wrote:
void foo(T, T2, alias thing = (){})(T a, T2 b)
{
thing();
}
void bar(){}
void main()
{
foo!(int,int,bar)(1,2);
foo(1,2);
}
Cool. Didn't know you can do that, but I guess it makes sense
that it would work th
void foo(T, T2, alias thing = (){})(T a, T2 b)
{
thing();
}
void bar(){}
void main()
{
foo!(int,int,bar)(1,2);
foo(1,2);
}
Is it possible to do something like this?
void foo(T, T2, alias thing)(T a, T2 b) {
// do stuff with a
// call b (since b would be a delegate)
// call thing if thing is given
}
I come from the Ruby world and I'm just playing around to see how
much I can replicate of the "block" functional
15 matches
Mail list logo