Why oh why doesn't Windows and macOS come with Python and Idle out of the box? Or does Mac, I forget.
Why oh why doesn't Windows and macOS come with Python and Idle out of the box? Or does Mac, I forget.
10 PRINT "HELLO"
20 GOTO 10
If you understand that the computer will execute lines in numerical order, it's very easy to understand that. The equivalent in Python of just that simple thing would not be so clear.It's great as an introductory language IMO. I disagree with Dijkstra that it will do any permanent damage -- if anything it will help the programmer appreciate the advantages of structured or object-oriented code when they are ready for it.
It used to ship with qbasic and a nice editor held over from dos. That was pretty good, though it was essentially hidden. It was there, but there was no icon for it and no docs or directions said to use it, let alone boot right to it as your primary interface.
Basically the driving force behind the production of Windows is the parts of MS that make money from it, not the developers who would write stuff for other developers if they could.
They want users that consume, not produce, and they absolutely do not want users who tinker and poke and modify.
They offer development systems only because they still have to, and they make even those into managed inscrutable products you merely use like powerpoint as much as possible.
Dijkstra's quote about people who learned programming with BASIC being beyond repair is obviously hyperbole, but given the number of programmers he taught, I'd assume he was seeing some significant difference that was important enough to prompt his statement.
It's disappointing that Windows doesn't release with an accessible interpreted language. They ship with a couple of games so why not drop some kind of super integrated and simple programming environment? Most of my generation cut their teeth on Microsoft Basic after all.
Buuut...the common Basic computers of the time had commands that let you do built-in graphics in a very simple manner. Not anything as crazy complex as the .NET charting and GUI stuff available to Powershell now. It's a real shame there isn't a built-in DSL that could allow normal users (i.e. not full time developers) to build some really simple games in like half a page of code.
I don’t remember Commodore Basic for the VIC-20 and Commodore 64 doing graphics other than through a series of POKEs.
Tangential: Artist Raquel Meyers does really great stuff with the CBM graphics character set, see https://www.raquelmeyers.com/
I think the C64 alone was responsible for a lot of the bad press BASIC got in the 1980s-1990s, from former Commodore owners who knew that one, terrible BASIC and concluded from a sample size of 1 that BASIC was bad.
Most other BASICs were better. Some on machines of the same era were much better. The BBC Micro had the same CPU and had BBC BASIC, the fastest interpreted BASIC ever written, with types, structured code, named procedures with local variables, inline assembler, rich graphics and sound support and more... in 32 kB of ROM (half for the modular extensible OS, the other half for the BASIC).
Tramiel cheaped out: the machine had 20 kB of ROM, with an OS half the size and a BASIC half the size (plus a fancy character set).
I expanded on this a few years ago, here: https://liam-on-linux.livejournal.com/71381.html
https://www.wikihow.com/Make-a-Video-Game-With-Cmd
https://youtube.com/watch?v=tYgUxz6Rd_o
A somewhat better choice is VBScript, which also ships with Windows and can be run with cscript/wscript.
What’s indeed missing is a built-in IDE. At least MS Office comes with a VBA IDE.
Because they have something better: a web browser with a javascript console.
$ find /usr/bin -inum $(stat -f %i /usr/bin/python3) | wc -l
76
$ cp /usr/bin/python3 /tmp/IEFBR14
$ /tmp/IEFBR14
IEFBR14: error: sh -c '⋯/Xcode.app/⋯/xcodebuild -sdk
⋯/Xcode.app/⋯/MacOSX.sdk -find IEFBR14 2> /dev/null' failed with exit
code 17664: (null) (errno=No such file or directory) xcode-select:
Failed to locate 'IEFBR14', requesting installation of command line
developer tools.
$
and then if you're in a GUI session it pops up a dialog box[1] offering to download and install the developer tools (even if they're already installed; the example above is from a Sonoma box with both Xcode 15.1 and the latest command line developer tools installed). $ /usr/bin/python3
[ 12:18:42 ]
Python 3.9.6 (default, Nov 10 2023, 13:38:27)
[Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more
information.
>>>
So I guess it depends on whether Xcode and developer tools are installed or not. Too bad it's not installed by default any more anyway.