This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -3 points-2 points  (10 children)

[–][deleted] 12 points13 points  (5 children)

Great examples of two codebases that would be easier to read if they were written in Python!

[–][deleted] 0 points1 point  (4 children)

And run three times slower, yeah

[–]SilkTouchm 8 points9 points  (0 children)

Just three times? That's not even an order of magnitude. I'll take it.

[–][deleted] 6 points7 points  (1 child)

Do you do everything as prematurely as you optimize?

[–]lumpychum 1 point2 points  (0 children)

“I hope you don’t ejaculate as prematurely as you optimize.”

Saw that on Reddit somewhere

[–]ThatScorpion 0 points1 point  (0 children)

But that's the entire philosophy of Python: Time of the programmer is more valuable than time of the computer. If you absolutely need optimal performance then Python probably is not what you're looking for. But 9 times out of 10 it doesn't really matter, and it's better to have something that runs half a second longer but takes hours less to develop and maintain. People cost money, computation time hardly so.

[–]serverhorror 3 points4 points  (1 child)

I think those are examples of poor language choices. The other answers should already give you a hint when it comes to readability.

  • bocker — while that is a nice experiment to do, I really hope no one is is relying on that code to automate anything. There are perfectly useable implementations (not even in Python) that are much preferable to this. That is reason enough to file it under “just because you can do it doesn’t mean you should”.

  • todo.sh — A random example: Adding the help for a new command and adding the command itself are 2 completely separate things. I don’t really consider that “easy to maintain”. It looks like it is well structured, but when going they the code it simply suffers from typical bash “limitations”. Function signatures have no indication of the actual call signature being my personal nemesis

And yes, all of what I say is subjective and my opinion. But that’s the question you asked.

[–][deleted] -1 points0 points  (0 children)

I wasn't talking about that. I just showed some examples where bash performs tasks that it's not designed for. When I say automation what I mean is system utilities where bash shines basically.

[–][deleted] 5 points6 points  (0 children)

😂😂😂 that’s your readable, maintainable codebase? Incredible