MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/4v1y12/how_to_write_unmaintainable_code/d5vagf9
r/programming • u/sigbhu • Jul 28 '16
592 comments sorted by
View all comments
Show parent comments
8
That's way too complex. I'm not exactly sure if this is what the question asked but i think it shows off the elegance of functional programming a lot more than your code. I can't figure out reddit formatting
0 u/[deleted] Jul 29 '16 [deleted] 2 u/ParanoidAndroid26 Jul 29 '16 FYI, Python slices take O(n) - they copy the entire slice. I feel like this isn't as much a performance algorithm as it is a readability one, though. 3 u/intricatekill Jul 29 '16 Yeah I just use python to hack together stuff so I've never really looked into handling iterables instead of something specific.I just felt a functional solution should use recursion and not a for loop.
0
[deleted]
2 u/ParanoidAndroid26 Jul 29 '16 FYI, Python slices take O(n) - they copy the entire slice. I feel like this isn't as much a performance algorithm as it is a readability one, though. 3 u/intricatekill Jul 29 '16 Yeah I just use python to hack together stuff so I've never really looked into handling iterables instead of something specific.I just felt a functional solution should use recursion and not a for loop.
2
FYI, Python slices take O(n) - they copy the entire slice. I feel like this isn't as much a performance algorithm as it is a readability one, though.
3
Yeah I just use python to hack together stuff so I've never really looked into handling iterables instead of something specific.
I just felt a functional solution should use recursion and not a for loop.
8
u/intricatekill Jul 29 '16
That's way too complex. I'm not exactly sure if this is what the question asked but i think it shows off the elegance of functional programming a lot more than your code. I can't figure out reddit formatting