News for hackers. Stuff that matters.
Re:Show HN: Koda, a typesafe functional toolkit for Python by deltaonefour on Monday February 07, 2022 @09:06PM (#30254115)
>They have to be a single python expression, but that’s not the same as the usual understanding of “functional” (i.e., referentially transparent). Consider:

True, yeah

>But it wouldn't be hard to write a typed sequence class that wrapped a lisp-style immutable list implemented with nested tuples with the deepest nested one an empty tuple in Python, there's just not a lot of demand for it.

A doubly linked list with the same slice syntax would be fine. You can use java style classes as it's just the underlying implementation. There's no demand (currently) but it's a good idea as python syntax works extremely well (better then even javascript) for functional programming.

There are no comments on this comment yet.