Hacker News new | ask | show | jobs
by pvg 3052 days ago
Everything you can write in Python you can write in Rust, and everything you can write in Rust you can write in Python.

That really isn't true in any practically meaningful sense. 'The main difference is everything is different' is not a very strong counter-argument.

1 comments

> "'The main difference is everything is different' is not a very strong counter-argument."

That wasn't my counter argument, and I can't work out what you misinterpreted about what I said to get that impression.

My point was, unlike a Dremel and a plasma cutter, Rust and Python can be used for the same tasks. As they're both Turing-complete, anything you write in one can be written in another. The differences I suggested were to highlight the relative strengths, or in other words how much work you'd need to put in to get the desired result.

To be clear, if you hadn't tried to dismiss the GP who requested information about how Python and Rust compared to each other, I wouldn't have replied.

As they're both Turing-complete

The moment you trot that out, you lose your 'but your analogy is terrible' privileges by default, however terrible my analogy is.

How so?
Because more or less everything is Turing-complete. Your mom is probably Turing-complete. 'Your mom' is a pithy but lousy argument.
> "Because more or less everything is Turing-complete."

If you understand what it means, then you'd know that it means that all programming languages are comparable, from assembly to Haskell, in the sense they can all be used to do the same job. Therefore, requesting a comparison of the strengths and weaknesses of two programming languages is not a foolish request. The point of such a request is to find out where it makes sense to use a particular language. To give another example, let's say someone asks if it's a good idea to write a web server in assembly or in Go. It's certainly possible in either, but in order to explore what the best choice is then further discussion is required. Comparing a Dremel to a plasma cutter is an attempt to shut down this discussion, which doesn't help in furthering the knowledge of the participants.

If you understand what it means, then you'd know that it means that all programming languages are comparable

I think this is where we strongly diverge and I resent, a bit, your implication that because I don't buy into this I somehow 'don't understand what it means'. I understand what it means. I just think it's plainly ridiculous.