5 ms·
what is this, why is 95% of the file useless comments: https://github.com/raaidrt/tacopy/blob/main/src/tacopy/unparser.py https://github.com/raaidrt/tacopy/blob
by lukasnxyz 10mo ago
what is this, why is 95% of the file useless comments: https://github.com/raaidrt/tacopy/blob/main/src/tacopy/unparser.py https://github.com/raaidrt/tacopy/blob/main/src/tacopy/unpar...
you're calling a built in function, why make obfuscate this in an "llm way"
- stingraycharles 10mo agoI also don’t think it’s actually tail call optimization, but rather an “unrecurser”. I’m also not convinced that this actually is worth the effort, considering it’s doing runtime rewriting of Python using Python.
- deleted 10mo ago[deleted]
- throwaway81523 10mo agoIt's a suboptimal implementation but it's interesting for the purpose of transpiling something like Scheme or ML or maybe Purescript to Python. Historically, suggestions to make Python tail recursive were rejected on the theory that the added stack frames helped debugging, and that Python was supposed to be an imperative language. But it has been dragged into supporting some FP idioms over the years and that has seemed like a good thing.
- raaid-rt 10mo agoCertain function calls that were unable to be run in Python can now be run. From that perspective, my thinking was that this was a net good since one can preserve the "clean syntax" from recursion while still being able to access the performance benefits of an iterative solution.
- jasonjmcghee 10mo agoIt's very llm-y. But, kudos to them for preserving the commit history / being honest about it.
- raaid-rt 10mo agoHaha this is my first attempt at making an open-source tool - I don't really know what kind of comment hygiene we want here.