Re: delegate issue

2014-06-02 Thread captaindet via Digitalmars-d-learn
On 2014-06-02 09:57, Steven Schveighoffer wrote: On Mon, 02 Jun 2014 10:37:07 -0400, captaindet <2k...@gmx.net> wrote: On 2014-06-02 08:03, MrSmith wrote: On Monday, 2 June 2014 at 06:56:54 UTC, captaindet wrote: hi, i stumbled upon something weird - it looks like a bug to me but maybe it is

Re: delegate issue

2014-06-02 Thread captaindet via Digitalmars-d-learn
On 2014-06-02 08:08, "Marc Schütz" " wrote: On Monday, 2 June 2014 at 06:56:54 UTC, captaindet wrote: hi, i stumbled upon something weird - it looks like a bug to me but maybe it is a "feature" that is unclear to me. so i know i can declare function and delegate pointers at module level. for f

Re: delegate issue

2014-06-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On Mon, 02 Jun 2014 10:37:07 -0400, captaindet <2k...@gmx.net> wrote: On 2014-06-02 08:03, MrSmith wrote: On Monday, 2 June 2014 at 06:56:54 UTC, captaindet wrote: hi, i stumbled upon something weird - it looks like a bug to me but maybe it is a "feature" that is unclear to me. so i know

Re: delegate issue

2014-06-02 Thread captaindet via Digitalmars-d-learn
On 2014-06-02 08:08, "Marc Schütz" " wrote: On Monday, 2 June 2014 at 06:56:54 UTC, captaindet wrote: hi, i stumbled upon something weird - it looks like a bug to me but maybe it is a "feature" that is unclear to me. so i know i can declare function and delegate pointers at module level. for

Re: delegate issue

2014-06-02 Thread captaindet via Digitalmars-d-learn
On 2014-06-02 08:03, MrSmith wrote: On Monday, 2 June 2014 at 06:56:54 UTC, captaindet wrote: hi, i stumbled upon something weird - it looks like a bug to me but maybe it is a "feature" that is unclear to me. so i know i can declare function and delegate pointers at module level. for function

Re: delegate issue

2014-06-02 Thread Timon Gehr via Digitalmars-d-learn
On 06/02/2014 04:30 PM, captaindet wrote: This doesn't work, because a delegate needs a context it can capture, which is available only inside of a function. so the real explanation is that a module as such has no context. much of the module design has the look and feel as if it were some so

Re: delegate issue

2014-06-02 Thread captaindet via Digitalmars-d-learn
On 2014-06-02 08:08, "Marc Schütz" " wrote: On Monday, 2 June 2014 at 06:56:54 UTC, captaindet wrote: hi, i stumbled upon something weird - it looks like a bug to me but maybe it is a "feature" that is unclear to me. so i know i can declare function and delegate pointers at module level. for f

Re: delegate issue

2014-06-02 Thread via Digitalmars-d-learn
On Monday, 2 June 2014 at 06:56:54 UTC, captaindet wrote: hi, i stumbled upon something weird - it looks like a bug to me but maybe it is a "feature" that is unclear to me. so i know i can declare function and delegate pointers at module level. for function pointers, i can initialize with a

Re: delegate issue

2014-06-02 Thread MrSmith via Digitalmars-d-learn
On Monday, 2 June 2014 at 06:56:54 UTC, captaindet wrote: hi, i stumbled upon something weird - it looks like a bug to me but maybe it is a "feature" that is unclear to me. so i know i can declare function and delegate pointers at module level. for function pointers, i can initialize with a

delegate issue

2014-06-02 Thread captaindet via Digitalmars-d-learn
hi, i stumbled upon something weird - it looks like a bug to me but maybe it is a "feature" that is unclear to me. so i know i can declare function and delegate pointers at module level. for function pointers, i can initialize with a lambda. BUT for delegates i get an error - see below i found