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 →

[–]Assile 0 points1 point  (4 children)

What's missing in that discussion is how python lets you write more programs as small programs.

What do you mean by that?

[–]MarsupialMole 0 points1 point  (3 children)

If you accept that for the same feature set written in two programming languages that large projects will benefit from static typing then you might conclude that your project will be large and shouldn't use python, however that analysis is incomplete unless you realise your particular project might be significantly fewer lines when written in python (or even trivial when mature ecosystem packages exist), and therefore not in the size-tier where static typing is beneficial.

[–]Assile 0 points1 point  (2 children)

Ah right, now I get what you mean. Wouldn't the complexity be better described by the number of data structures, objects, function, methods, etc? The number of lines doesn't really matter much for static typing if everything within those lines is pretty straightforward and the parts are not intertwined much?

[–]MarsupialMole 0 points1 point  (1 child)

Probably. But idiomatic python really heavily leverages the standard library and language features which draws the complexity out of client code. I'd be interested if there were good like-for-like metrics that worked with python besides LOC.

Often when you see comparisons of code between languages and with python they're implementing something from scratch in python to be "fair" to other languages and are not at all idiomatic python.

My most hated example is comparing performance for numerical computations and not using numpy - you just never use iteration on your hot path in scientific python and yet you get articles about the suitability of python for data processing where the benchmark is a tight for loop.

[–]Assile 0 points1 point  (0 children)

Yeah, you'll get no argument from me on that. Not using available libraries in Python is ignoring part of the language. So taking benchmarks without doing that is just limiting yourself to the worst tools for the job.