3 ms·
On the other hand, I like the explicitness of it instead of automatically converting to a different type. At least you know exactly what it's doing. The python
by anaphor 7y ago
On the other hand, I like the explicitness of it instead of automatically converting to a different type. At least you know exactly what it's doing.
The python version of it would be calling `list()` on things all the time, which you might not always want to do.
- abaga129 7y agoThat's a fair point. I'm not necessarily against having to do it, I just would like there to be a more obvious indication of how to convert the result to an array. It took a lot of searching the first time I came across this. Perhaps it's just my own incompetence though!
- anaphor 7y agoIt's definitely not your incompetence. I started learning D a few months ago and it didn't click until someone on IRC explained it clearly to me. It's not in the tutorial or anything unless I missed it.
- he_the_great 7y agoIt is the first thing I added to my articles when I introduced range based operations : https://dev.to/jessekphillips/count-of-a-list-in-d-49k4 https://dev.to/jessekphillips/count-of-a-list-in-d-49k4