Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
maccard
on Aug 12, 2024
|
parent
|
context
|
favorite
| on:
Go is my hammer, and everything is a nail
I think Rusts terseness shows here - I think C#'s approach is the best. Also, if you don't use `.ToArray()`, you still have an IEnumerable which is very usable.
umanwizard
on Aug 13, 2024
[–]
Also true in Rust. You don't have to use `collect` at the end and you still get an iterator.
let results = foo .into_iter() .filter(|s| s.contains("banned"))
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: