From the D Blog: Crafting Self-Evident Code in D

matheus matheus at gmail.com
Tue Oct 3 10:39:19 UTC 2023


On Monday, 2 October 2023 at 17:28:19 UTC, Mike Parker wrote:
> It's been a long, long while since I published anything on the 
> blog. I do intend to get pick it up again down the road, but 
> Walter recently surprised me with plans of his own. He's taken 
> the topic of his DConf '23 talk and derived a blog post from it:
>
> https://dlang.org/blog/2023/10/02/crafting-self-evident-code-with-d/
>
> I guess he got impatient with the pace at which I'm getting the 
> talk videos uploaded :-)
>
> And for anyone who'd like to engage in any Reddit discussion 
> that comes up:
>
> https://www.reddit.com/r/programming/comments/16y2h36/crafting_selfevident_code_in_dlang/

Nice article but I think that I found a bug:

     g(f(e(d(c(b(a))),3)));

     a.b.c.d(3).e.f.g;

> "That’s the equivalent, but execution flows clearly 
> left-to-right. Is this an extreme example, or the norm?"

Well I don't think they're equivalent:

     g(f(e(d(c(b(a))),3)));

I the first example "e" is receiving two arguments. While in the 
latter "d" is being receiving whatever "c" returns and "3".

Matheus.


More information about the Digitalmars-d-announce mailing list