Article: The surprising thing you can do in the D programming language
user1234
user1234 at 12.de
Thu Aug 20 10:20:59 UTC 2020
On Thursday, 20 August 2020 at 10:12:22 UTC, aberba wrote:
> Wrote something on OpenSource.com
>
> https://opensource.com/article/20/8/nesting-d
I'm not sure. A few notes on nesting.
1. context pointer can prevent inlining. you can nest static
funcs, but then what is the point
2. bad complexity. you can make the nested funcs static and
factor them out. The code is more readable.
3. lambda. If you want to nest lambda are better. Solves point 2
but not point 1.
But otherwie still nice to see a bit of D promotion here and
there ;)
More information about the Digitalmars-d-announce
mailing list