News for hackers. Stuff that matters.
Re:Why Haskell? by Izkata on Thursday September 12, 2024 @06:20PM (#41526253)
My example was just a way to do it with plain python and nothing special. There are libraries that use operator overloading to get more F#-style syntax.

For example: https://ryi.medium.com/flexible-piping-in-python-with-pipey-...

And another mentioned there: https://pypi.org/project/pipe/

Re:Why Haskell? by kingdomcome50 on Friday September 13, 2024 @01:09AM (#41528159)
I think we can just let this rest. These kinds of operations are not as ergonomic in python. That's pretty clear. No example provided is even remotely close to the simplicity of the F# example. Acquiesce.
Re:Why Haskell? by Izkata on Friday September 13, 2024 @08:51AM (#41530766)
You do realize this was in my original comment, right?

> It's certainly not as clean as F# but neither is it as bad as the original example if there's a lot of functions

Re:Why Haskell? by z500 on Friday September 13, 2024 @09:15AM (#41530969)
The fact is the language just works against you in this area if you have to jump through hoops to approximate a feature other languages just have. And I don't even mean extra syntax like F#'s pipe operators (although I do love them). Just swapping the arguments so you could chain the calls would look a lot better, if a little LISPy. It really is that bad.