4 ms·
Which non-computational things can you do in JS and Python can you not do in the other and vice versa? I believe my machine can only do computations.
by jsprogrammer 11y ago
Which non-computational things can you do in JS and Python can you not do in the other and vice versa? I believe my machine can only do computations.
- scott_s 11y agoaerovistae is talking about the abstractions provided by the language. Yes, all Turing-complete languages can all compute all computable functions. But not all languages structure those computations in the same way, or make the same things easy or hard. For example, Python has the concept of a decorator: https://docs.python.org/2/glossary.html#term-decorator https://docs.python.org/2/glossary.html#term-decorator. You can achieve the same thing in a variety of ways in JavaScript, but Python makes the concept of "a function that wraps another function" a central abstractions by providing syntax directly for it.
- aerovistae 11y agoPrecisely. Likewise, in JavaScript I can pass complex anonymous functions (not just little lambdas) as function arguments. I cannot do this in Python.
- jsprogrammer 11y agoaerovistae specifically talked about the computational ability of languages: >Unless of course you're trying to argue that the difference between python and javascript, for instance, is what each is capable of computing?
- scott_s 11y agoIn a discussion like this, it's best to assume that all parties understand the ramifications of Turing-completeness. The charitable interpretation is that aerovistae meant what I said - which is apparently the case.
- jsprogrammer 11y agoI agree, however kzhahou made a claim that there could be a language that could do something another couldn't. The discussion with aerovistae about computation came from their initial post: >Unless of course you're trying to argue that the difference between python and javascript, for instance, is what each is capable of computing? If we are talking about ideal machines, there is no argument to be made that there is a difference between what the two named languages are capable of computing.
- aerovistae 11y agoomg... In real life I am very happy to have very extended conversations explaining things to people who don't get it, but on the internet, it's really just not worth it. I'm sorry you have misunderstood so much of this thread.
- jsprogrammer 11y agoMaybe it is you who misunderstands? I see your point, but my point is different. If you can give me the specific words of mine that you believe show a misunderstanding, I could try to clarify.
- joepvd 11y agoHi jsprogrammer, no one is making an argument about computability. This is about how programmers can express themselves and reason about code. Not many people would choose to write their CMS in assembly.