On Tuesday, 16 January 2024 at 17:21:12 UTC, FeepingCreature
wrote:
Correct. [...]
Thanks, I think I understand.
On Tuesday, 16 January 2024 at 15:39:07 UTC, Anonymouse wrote:
If I make a `scope` variable of the delegate and pass *it* to
`receiveTimeout`, there no longer seems to be any mention of
the closure in the error (given 2.092 or later).
```d
void foo(Thing thing) @nogc
{
void
On Tuesday, 16 January 2024 at 13:45:22 UTC, FeepingCreature
wrote:
Am I safe as long as I don't do something like, pass
`` as an argument to `std.concurrency.receive`?
Yes.
Thank you.
And to make sure I don't misunderstand the spec; in the case I
*do* have a delegate I want to pass
On Tuesday, 16 January 2024 at 10:56:58 UTC, Anonymouse wrote:
I'm increasingly using nested delegates to partition code.
```d
void foo(Thing thing)
{
void sendThing(const string where, int i)
{
send(thing, where, i);
}
sendThing("bar", 42);
}
```
...
3. Those
I'm increasingly using nested delegates to partition code.
```d
void foo(Thing thing)
{
void sendThing(const string where, int i)
{
send(thing, where, i);
}
sendThing("bar", 42);
}
```
...where the nested `sendThing` sometimes returns something,
sometimes doesn't.