Re: Check whether function/delegate uses any shared or global variables

2016-12-12 Thread Nikhil Jacob via Digitalmars-d-learn
On Monday, 12 December 2016 at 12:30:42 UTC, Jacob Carlborg wrote: On 2016-12-12 12:15, Nicholas Wilson wrote: there is the pure function attribute, how ever this still allows you to use globals *if you pass them as parameters to the function*. And it can access immutable global data.

Re: Check whether function/delegate uses any shared or global variables

2016-12-12 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-12-12 12:15, Nicholas Wilson wrote: there is the pure function attribute, how ever this still allows you to use globals *if you pass them as parameters to the function*. And it can access immutable global data. -- /Jacob Carlborg

Re: Check whether function/delegate uses any shared or global variables

2016-12-12 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 12 December 2016 at 11:37:04 UTC, Nikhil Jacob wrote: On Monday, 12 December 2016 at 11:15:28 UTC, Nicholas Wilson wrote: On Monday, 12 December 2016 at 11:02:21 UTC, Nikhil Jacob wrote: Is there any way to check whether a function/delegate passed to a function uses any shared or

Re: Check whether function/delegate uses any shared or global variables

2016-12-12 Thread Nikhil Jacob via Digitalmars-d-learn
On Monday, 12 December 2016 at 11:15:28 UTC, Nicholas Wilson wrote: On Monday, 12 December 2016 at 11:02:21 UTC, Nikhil Jacob wrote: Is there any way to check whether a function/delegate passed to a function uses any shared or global variables ? I could not find any in std.traits. there is

Re: Check whether function/delegate uses any shared or global variables

2016-12-12 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 12 December 2016 at 11:02:21 UTC, Nikhil Jacob wrote: Is there any way to check whether a function/delegate passed to a function uses any shared or global variables ? I could not find any in std.traits. there is the pure function attribute, how ever this still allows you to use

Check whether function/delegate uses any shared or global variables

2016-12-12 Thread Nikhil Jacob via Digitalmars-d-learn
Is there any way to check whether a function/delegate passed to a function uses any shared or global variables ? I could not find any in std.traits.