News for hackers. Stuff that matters.
Re:Functorio by haet on Wednesday February 17, 2021 @10:27AM (#26167366)
What does a functional Python look like?

To me, a functional language without tail recursion seems pointless. Is it possible to abstract away whether you are recursive or iterative, like an iterative recursion scheme?

One thing that I think would be great is if there was a Python approach to effects systems like Polysemy (free monads); what might an in between be for this?

Re:Functorio by m_mueller on Wednesday February 17, 2021 @12:43PM (#26169125)
I don't think Python's type system is capable enough (yet) for something like this. However tail recursion optimization to me is a non issue - for something expensive and deeply nested I use an iterative approach, and for everything else python's recursion is good enough. There are not that many usecases like this per code base anyways, in my experience. In my current one there is one central facility to do object loading based on yaml definitions, that's the one place I need it there for example.
Re:Functorio by lmm on Wednesday February 17, 2021 @10:33PM (#26175317)
> To me, a functional language without tail recursion seems pointless.

Tail recursion is a low-level detail IMO. Scala does fine without it.

Re:Functorio by Qem on Thursday February 18, 2021 @10:28AM (#26180892)