
On Sat, 27 Feb 2021 at 11:04, Paul Moore <p.f.moore@gmail.com> wrote:
On Sat, 27 Feb 2021 at 01:08, Oscar Benjamin <oscar.j.benjamin@gmail.com> wrote:
The other point though is that it doesn't need to be like this. If the issue was just installing Python and then setting up your PATH then that's manageable. The problem is that even after doing those things there isn't a "one way" to invoke Python from the command line. All possible invocations (python, python3, py, ...) will fail for some users. That's a problem for beginners but it's also a problem in any situation where you want to write a command line that should run on multiple platforms (e.g. in a Makefile or some other kind of script).
This is 100% true. (At least the part where you say that "it's a problem". I'm not sure if "it doesn't need to be like this" is true - can you point to a language where the command line "just works" the way you suggest?)
Python from 15 years ago :) Maybe I'm misremembering but when I first started with Python there didn't seem to be any ambiguity about what to type in the terminal. The first split as I remember it was on Linux when python3 came along but python kept referring to 2.x on (most) Linux. At the same time python3 was not added to Windows and instead python became 3.x. Then there was the py launcher for Windows. Perhaps this problem always existed on OSX although I didn't use it at all at the time. More recently I've been exploring Julia. You could compare these pages: https://docs.python.org/3/tutorial/interpreter.html#invoking-the-interpreter https://docs.julialang.org/en/v1/manual/getting-started/ When installing julia you select the installer for your OS and there are some instructions for setting up PATH (although I didn't need to do that manually on OSX). After setup the instruction is that you type "julia" in the terminal and then Ctrl-D to exit. There are no caveats or mentions of different operating systems or words like "if" and "usually". The setup process is platform specific but then the usage instructions are not. -- Oscar