News for hackers. Stuff that matters.
Re:My Vision of D’s Future by jordigh on Tuesday October 15, 2019 @02:52PM (#21262248)
It's not the best idea to always unconditionally use .array because you might want to preserve the laziness of a Result type. By using .array you're saying you want all of the results into memory right now! Depending on what you're doing, you might not want that.
Re:My Vision of D’s Future by abaga129 on Tuesday October 15, 2019 @06:48PM (#21264870)
I actually didn't know this! Very cool. I guess it's similar to calling .ToList() on IEnumerable<T> in C#.
Re:My Vision of D’s Future by p0nce on Wednesday October 16, 2019 @08:37AM (#21269676)
Most range function return a "Voldemort" that preserve lazyness if you put it in an `auto` local. Or you can use .array to get a slice out of it.