News for hackers. Stuff that matters.
Re:The 4-chan Go programmer by lelanthran on Thursday August 29, 2024 @05:44AM (#41389005)
> In that context using goroutines is an overkill. Harder to implement, harder to use and slower.

I agree with this, but my assumption was very different to yours: that the tree was sufficiently large and/or the processing was sufficiently long to make the caller wait unreasonably long while walking the tree.

For scanning < 1000 files on the local filesystem, I'd probably just scan it and return a list populated by a predicate function.

For even 20 files on a network filesystem, I'd make it async.

There are no comments on this comment yet.