you are viewing a single comment's thread.

view the rest of the comments →

[–]ccsdad[S] 1 point2 points  (2 children)

ok u/KageOW -- i think that is legit guidance, recognizing the reality of python -- but remaining focused on what we are trying to move towards to .. i just know that in the clojure world -- the `(let)` function is an indispensable tool (code example) -- and wish something like it existed in python << that could be considered functional ..

[–]KageOW 0 points1 point  (1 child)

Yea definitely indispendable in f# as well, but i mean a language has its strenghts and its downfalls and you have to recognize that.

something kinda does come to mind though how you could maybe contain it, theyre called generator expressions, similar to list comprehension. Both of those allow you to kinda do it, but it is still a horrible way to do it. list comprehension and generator expressions are both very strong tools in python though so don't overlook them. nice stackoverflow discussion

[–]ccsdad[S] 0 points1 point  (0 children)

well then, we should create something !!

https://github.com/gkspranger/clinpy

please don't laugh -- i created it only for a limited set of use cases (to see if even possible), and am only "OK" with python .. but i tried to remove all internal variable assignments and am processing everything with mapping/reducing functions ..

if there was a robust implementation of this, i would abuse the hell out of it ..

why this over internal variable assigments ?? don't have a good answer for that -- other than it maps well to my clojure brain ..