4 ms·
>but for an actual language comparison, you should be comparing things 1 to 1. Not really, you should be comparing the idiomatic ways in each language. And if
by coldtea 7y ago
>but for an actual language comparison, you should be comparing things 1 to 1.
Not really, you should be comparing the idiomatic ways in each language.
And if Python is more of a "batteries included / easily installable" language, then that's how you should use it.
>EDIT: For example, implementing a merge sort (without using any .sort() functions) would be interesting to compare between the three languages.
Only if you want to see how each language feels in terms of primitives and syntax and so on. Not if you want to see how you'd actually use the language, and what facilities and ecosystem you can leverage, which is more important.
If I'm going to compare Python for scientific computing to Java, for example, of course I'll consider that Python has Nympy, Pandas, Anaconda, and so on, and similar for what Java offers, not just try to e.g. write my own math code in pure Python and Java. Same for most domains...
- tomtomtom777 7y ago> Not really, you should be comparing the idiomatic ways in each language. > And if Python is more of a "batteries included / easily installable" language, then that's how you should use it. This isn't python specific. "Idiomatic" Rust would also be to import the crate that does image comparison. It just happens to be that for this particular problem a python library was found, but no rust crate. This isn't all that common.
- Thorentis 7y agoSure, that makes sense in a specific way - perhaps if you were deciding which language to use for a particular project. You'd look at which libraries it offers, which features you will be making the most use of etc. But in this case, it's comparing two languages generally to each other. And the example chosen biases Python in terms of brevity and complexity because Python has a library for the use case chosen for the comparison. If you want to do a general comparison you need to be general in your approach.
- chucksmash 7y ago> the example chosen biases Python in terms of brevity and complexity because Python has a library for the use case Which would also be true for many other examples they might have picked, which makes it a reflection of the ecosystem, not a distortion. It's a "subjective, primarily developer-ergonomics based" comparison. Seems like fair game to me.
- carlmr 7y agoPandas is not an included battery. I agree with the how many batteries are included, which for rust is few (although cargo also manages packages much more cleanly than pip, so you could argue that libraries aren't as problematic). But then comparing with non included libraries it becomes just a contest for age * popularity of the language for the specific task. That is useful when considering languages for a project, but not if you want to compare how good the languages are.