On Saturday, 24 December 2022 at 16:34:29 UTC, Ali Çehreli wrote:
static this() blocks: executed when a thread a starts (the program has at least one thread: the main thread); so you can put initializations here

~static this() blocks: counterparts of 'static this', executed once for each thread that is terminating

shared static this() blocks: executed once per program (executed by the main thread)

~shared static this() blocks executed once per program when the program is terminating

>>     "rand" : () => new Atom(rand01)

That's the lambda (ananymous function) syntax.

The "rand" key of an associative array is being associated with the function after the ':' character. In the code above, the

Ali, your post contained at least 3 things I did not previously know about D; thank you!

And thank you all for helping troubleshoot this issue with my hobby language!

Reply via email to