On Thursday, 14 February 2013 at 11:58:13 UTC, Jacob Carlborg
wrote:
On 2013-02-14 10:46, Walter Bright wrote:
I don't understand why one would go around the horn to just
check for
!empty.
I've tried to explain, it shows what the intention is.
Instead of "str.length == 0" I use "str.empty". Instead of
"!str.empty" I like to use "str.any".
It's not a big deal but I would need to change quite a lot of
code if "str.any" isn't allowed.
I totally agree with Walter, it adds useless cognitive load. I
thoroughly hate it. I would need to have to look at the doc to
know what any means, while !empty, everyone already knows it. And
I don't want D to be another Perl, where one can write the same
thing in ten different manners, so that it's impossible to
recognize patterns or a common style.