Re:Want cleaner code? Use the rule of six
by BiteCode_dev on Sunday September 25, 2022 @03:43AM
(#32969649)
I don't know, it doesn't seem very far form the python version:
[ Parent
| on HN ]
Re:Want cleaner code? Use the rule of six
by oriolid on Sunday September 25, 2022 @07:54AM
(#32970529)
This is already showing why the the Python list/iterator comprehension syntax isn't great. The part "s.partition('?')[-1].split('&')" reads from left to right, and then the rest is read from end to beginning. It gets even more confusing with nested comprehensions. In my opinion both the dotted pipeline style and the Lisp style where you always start from the deepest nesting level are both more readable than Python's approach with sometimes from left to right, sometimes from right to left and sometimes from middle out.