3 ms·
I see your point, but what happens in your alternate world of having to maintain the 5000-line Python version 5 years down the line? You face the same issues yo
by jmmv 4y ago
I see your point, but what happens in your alternate world of having to maintain the 5000-line Python version 5 years down the line? You face the same issues you describe. The people that wrote the original beautiful code aren't there anymore, and whoever comes touching the code "messes it up". Most Python "scripts" I have had to deal with that had been around for a while were pretty terrible as well.
- HL33tibCe7 4y agoI don’t think you do see my point: my point is that writing clean, testable, maintainable Python is both easier and a more widespread skill than writing equivalently clean, testable and maintainable shell. Both of these factors will mean that the Python remains maintainable for longer.
- fbdab103 4y agoBad code is bad code, regardless of language. At least with Python, I more or less know all of the idioms and can at a glance understand what the flow of a program is trying to accomplish. Shell has a lot of esoteric voodoo syntax to replicate better string/path/array handling that is just a given in other languages.
- _dain_ 4y agoFirst, I doubt that the SLOC conversion ratio between sh and Python is really as high as 10x. Second, yes, I do think the 5000 line Python script would be more maintainable than than the 500 line sh script. I'd choose real types and data structures any day of the week.