|
BASIC is far worse than that. Like, at least in Python, len() is a regular function. In BASIC, tons of core features are implemented as statements, with rather weird syntax that got even more weird over time. LINE (x1, y1) - (x2, y2), 5, FB
Can you remember what it does? (no, it doesn't draw a line; it would, if not for "FB").Or, for example, MID$ is a function, except when it's not: MID$(s$, 1) = "foo"
Then there's stuff like DEFINT and GOSUB and ON STRIG and ...The reason for all this is that BASIC was never designed as a language in which the standard library could mostly be written, or even described, in that language. Thus, most features were implemented as intrinsics, with magic syntax and/or semantics, which varies drastically from feature to feature. This goes even for the standard functions - e.g. MID$ is a function (except when it's not, as above) - but it can take either 2 or 3 arguments, which is not something that you can declare yourself. As a result, when language evolved, it also did so in a haphazard way, as with LINE re-purposed for other reasons. The original BASIC was very simple (but also non-extensible). The BASIC that most people remember - at its peak - was actually more complicated than an equivalent subset of Python. |
Enhancing Applesoft using ampersand routines: https://link.springer.com/content/pdf/10.3758/BF03203836.pdf
>Applesoft BASIC's ampersand (&) jump feature gives the programmer an easy and fast way to connect machine language routines to BASIC. When the Applesoft interpreter encounters an "&," it does an immediate and unconditional jump to location $3F5 (decimal 1013). This feature, originally described as being "intended for the computer's internal use only" and "not a proper APPLESOFT command" (Apple Computer, 1978, p. 123), has become the favorite procedure for executing machine language routines from a running Applesoft program.