3 ms·
This is a pretty silly comparison to be honest. Why would you choose an example for which a library exists in Python that can already do most of the work for yo
by Thorentis 7y ago
This is a pretty silly comparison to be honest. Why would you choose an example for which a library exists in Python that can already do most of the work for you? Sure, it might be the most "Pythonic" thing to do (importing a library) but for an actual language comparison, you should be comparing things 1 to 1.
EDIT: For example, implementing a merge sort (without using any .sort() functions) would be interesting to compare between the three languages. Though to be honest, I wouldn't expect major differences aside from basic syntax.
- 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.
- ChrisSD 7y agoI understood this to be more a journey in discovering languages than a direct comparison. Personally I found it interesting to see how someone used to high level languages (like Python and Go) adapt to using Rust for a project.
- acomjean 7y agoI thought it was interesting because unlike other comparisons I've seen it was someone using a high level language going to "lower level" ones. Like any comparisons there are a lot of different ways to do thing (even python...), so they'll always be "we didn't they use this or that". And frankly there are very few of these comparisons written by experts in all the languages (usually its someone writing up there experience). For example's one might complain, he's comparing speeds using "Pillow" which seems to be a c -library wrapped for python, but honestly that's how one might do it, ands its pretty easy, so its legit to me.