News for hackers. Stuff that matters.
Re:Fun with Go Iterators by pdimitar on Thursday October 10, 2024 @09:16AM (#41798487)
Might be interesting to make a library that competes with https://github.com/samber/lo?
Re:Fun with Go Iterators by mseepgood on Thursday October 10, 2024 @10:53AM (#41799475)
It's not interesting. Boring people did this a million times, the result is always the same: just use for loops.
Re:Fun with Go Iterators by gtramont on Thursday October 10, 2024 @09:41AM (#41798723)
Back when the Go team announced generics, I had a go (pun intended) at it: https://github.com/gtramontina/go-extlib -- might resurrect it one day. `lo` is pretty comprehensive though.
Re:Fun with Go Iterators by mihaitodor on Thursday October 10, 2024 @09:49AM (#41798798)
Here's one: https://github.com/szmcdull/glinq It doesn't do function chaining though.
Re:Fun with Go Iterators by acheong08 on Thursday October 10, 2024 @02:08PM (#41801521)
> Tips for lazy developers > I cannot recommend it, but in case you are too lazy for repeating lo. everywhere, you can import the entire library into the namespace.

    import (
        . "github.com/samber/lo"
    )
TIL. Crazy
Re:Fun with Go Iterators by s6af7ygt on Friday October 11, 2024 @03:40AM (#41807217)
I just hate the fact that Go is super simple and clear but people try to make it complex with this kind of stuff. :( Makes me sad.