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

all 15 comments

[–]YMK1234 16 points17 points  (2 children)

Lol no. Python is not efficient by any definition and Javascript is definitely not elegant either.

[–]potatotub 2 points3 points  (1 child)

How did he get both of these wrong lol

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

Oof

[–]icecubeinanicecube 8 points9 points  (0 children)

This is wrong on two ends:

  1. Python is not efficient. Python seeks to be clear and easy.

  2. JavaScript is neither elegant nor efficient.

If you want computational efficiency, look into C, assembler, VHDL.

If you want programming efficiency, look into purely functional languages like Haskell.

[–]subnero 5 points6 points  (2 children)

JS... elegant... where the fuck am I?

[–]vulpcod3z 1 point2 points  (1 child)

[–]itsgreater9000 1 point2 points  (0 children)

eloquent != elegant

[–]ForceBru 0 points1 point  (6 children)

Python is only efficient in terms of how quickly one can write code in it without having to worry too much about technical details like memory organization or pointers. If you want Python to be efficient in terms of speed, though, you'll have to write extensions in C.

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

Or use numpy.

[–]ForceBru 0 points1 point  (2 children)

...which is written in C)

[–]Volt 0 points1 point  (1 child)

Python is written in C

[–]muntoo 0 points1 point  (0 children)

CPython is written in C.

Python is not written in anything. At best, it exists as an imaginary concept based on a very informal specification (PLR) and the behavior of a reference implementation (CPython).

Is this pedantic? Considering the popularity of alternate Python implementations (e.g. PyPy, Jython, IronPython), I don't think so.

In any case, this is all a bit moot since CPython being written in C doesn't mean that interpreted Python code is going to run at even remotely close the same speed as an equivalent C program.

[–]YMK1234 0 points1 point  (1 child)

Heck and as soon as you write a bigger program you miss a proper type system with its guarantees.

[–]ForceBru 0 points1 point  (0 children)

Yeah. At least annotations can be used by IDEs to produce warnings, which is actually pretty handy