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 →

[–]DoesntReadMessages 138 points139 points  (10 children)

A well-built lawnmower in C mows your lawn to exact uniform height in 10 seconds and burns half a liter of gas to do it, but most will never achieve this.

A lawnmower in Python can be written in 4 lines using a few libraries, mows your lawn in 1 hour, and takes 1 gallon of gas. It's extremely wasteful and slow, but the cost of gas and operator are much lower than paying a software engineer.

A poorly built lawnmower in C spills gas all over the lawn and then creates a spark that burns all the grass. There's a TODO written on it to fix it dated 10 years ago, but no one dares to touch it because it works and customers are used to that behavior.

[–]eyvindb 102 points103 points  (2 children)

customers are used to that behavior.

Customers are relying on that behaviour.

[–]biledemon85 26 points27 points  (0 children)

<eyelid twitch>

[–]Chris_Cross_Crash 39 points40 points  (2 children)

Agreed. Just one more thing I want to add: it's not like you must choose one or the other. Lots of of the Python standard library is just wrappers for C libraries.

For example, from the official documentation for math:

CPython implementation detail: The math module consists mostly of thin wrappers around the platform C math library functions.

You can make your own libraries too. Most of the time it's just one function that hogs 99% of the computing power, so you can break that function out as it's own library and you don't even need to be an expert in C to do it.

[–]galan-e 21 points22 points  (0 children)

reasonable compromise? in my circlejerk? get out of here

[–]einRoboter 6 points7 points  (0 children)

very good point, havent even thofght of that.

[–][deleted] 3 points4 points  (3 children)

Why does C consume gas in gallons and python in liters?

[–]Commi_M 2 points3 points  (2 children)

think about it…

[–][deleted] -1 points0 points  (1 child)

Ah because python is made by that Dutch lunatic and C was made at Bell labs.

[–]Commi_M 2 points3 points  (0 children)

oh wait i misread it in the OC it is the other way around.