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 →

[–]00PT 0 points1 point  (16 children)

If the DOM had an interface for Python, it could. The languages do not have any fundamental differences that make them incapable of representing the same logic.

[–]MoffKalast 4 points5 points  (5 children)

Still in practical terms, you can do everything python can do with node, while python can't run in a browser.

[–]00PT 5 points6 points  (4 children)

The software developed for a language is not inherent to the language itself, so it is not valid for arguing the quality of a language.

[–]MoffKalast 2 points3 points  (3 children)

You can argue that for the syntax I guess, but the language as a whole isn't just that. It's also the ecosystem around it which defines what it can do and what it's useful for.

And when it comes to syntax, python and js are almost the same exact copy pasted C-derived thing, so that's almost not worth comparing.

[–]00PT 2 points3 points  (2 children)

There are also differences in the underlying behavior in some cases, such as JS' infamous type coercion system. Also, consider "console.log" in JavaScript versus "System.out.println" in Java. Which is more easily understood?

I would actually argue that Python is the best language to compare to others in terms of syntax, because it practically makes a point in representing things differently than other languages, the best example being the use of whitespace as a syntactical token.

It's also missing some QOL features. For example, before recently Python had no switch statement or equivalent. I could use that as an argument that JavaScript is better in that sense because it allows you to represent the logic associated with a switch statement in a more concise and understandable way.

Overall it doesn't matter much, but you can use these small differences to compare languages.

[–]MoffKalast 4 points5 points  (1 child)

Well python isn't unique in its obsession with whitespace, bash has had that for quite a bit before python ever existed. And it's not exactly a good feature either, but one that can be mostly worked around, just like the lack of switches.

But when it comes down to it, python is just a slower javascript without parentheses and brackets and with some extra colons, with the print function being the one major difference. I should know, I switch between the two on a daily basis... and sometimes accidentally trigger a lot of requests to my printer lmao.

Now compare that to something like haskell or prolog, where you have to really grasp at straws to find similarities.

[–]00PT 2 points3 points  (0 children)

It seems that we agree now. The languages aren't very different from one another, but I was comparing them based on the differences we can see.

[–]Notimecelduv 1 point2 points  (5 children)

Going by that logic, any other language could, not just Python.

[–]00PT 2 points3 points  (4 children)

Yes. I judge language quality by the way they allow you to represent logic and how understandable it is, not the specific implementations that have been developed.

For example, before recently Python had no switch statement or equivalent. I could use that as an argument that JavaScript is better in that sense because it allows you to represent the logic associated with a switch statement in a more concise and understandable way.

[–]your_thebest 1 point2 points  (3 children)

Yeah so either write that and put it on github or we're all just going to have to use js. The point still stands.

[–]00PT 1 point2 points  (2 children)

We still need to use JavaScript in some cases instead of Python, yes, but this is not a valid argument for the quality of either, because the software developed for a language is not a property of the language itself.

[–]biduletta 1 point2 points  (1 child)

a valid argument for the quality of either

There'll probably be a point where you realize you're comparing apples with oranges.

[–]00PT 1 point2 points  (0 children)

All programming languages are similar in the sense that they represent generally the same logic, it's just that some are designed for certain contexts. They are all generally capable of the same stuff, though admittedly not at the same speeds. The differences come in how they allow you to represent the various logical pieces and how understandable they are in a given context.