On Friday, 24 July 2020 at 21:18:37 UTC, Steven Schveighoffer
wrote:
On 7/24/20 4:34 PM, aberba wrote:
Wrote something on the feature that makes D my favorite
programming language
https://opensource.com/article/20/7/d-programming
Nice!
You could make this more dramatic. I'm sure you just "did it
automatically", but you used UFCS in your function
implementation as well!
return numbers.filter!(n => n % 2 == 0).array;
Without UFCS, this really should be written:
array(filter!(n => n % 2 == 0)(numbers));
If you use that in the first boring non-UFCS version, then I
think the wow factor goes up ;)
Someone said something similar in the comments 😅.
-Steve