Article: the feature that makes D my favorite programming language

Steven Schveighoffer schveiguy at gmail.com
Fri Jul 24 21:18:37 UTC 2020


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 ;)

-Steve


More information about the Digitalmars-d-announce mailing list