Sure, it compiles but your code also appends a list at the end of a loop and then empties it at the beginning. It's good code in the sense that it does in fact work, it just doesn't do what you want it to do.
The ability to write a program that does something measurably faster, smaller or more reliably is the real skill and that's largely language independent.
View all comments
Show parent comment
12
u/neohellpoet 9h ago
It's coding vs programing.
Sure, it compiles but your code also appends a list at the end of a loop and then empties it at the beginning. It's good code in the sense that it does in fact work, it just doesn't do what you want it to do.
The ability to write a program that does something measurably faster, smaller or more reliably is the real skill and that's largely language independent.