News for hackers. Stuff that matters.
Re:Lenses by prionassembly on Monday June 27, 2022 @10:03AM (#31894726)
I started using monads in Python as sort of a gimmick / something to add flavor to a boring project (I was guessing in a final form we'd keep Result types and throw away most other things) but by now they're a boon to productivity and easy to read in fluent notation. Plus they're easy to implement from scratch if you're dependency-phobic (on the rather rickety selection of monad libraries out there, too).
Re:Lenses by yccs27 on Monday June 27, 2022 @12:55PM (#31897326)
What monad library do you use? When I tried using monads in Python a while ago it felt like Python just wasn't made for monadic programming.
Re:Lenses by prionassembly on Tuesday June 28, 2022 @09:35AM (#31907482)
I use basically variations of copy-pasted code from tutorials and (I think) pymonad. I keep reimplementing things because the last API had warts. Maybe one day I'll have a library.