Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8162

Other programming languages • Re: Basic on Raspberry

$
0
0
Why hasn't BBC BASIC been adapted for modern PCs?
It has, but extensions to the core language have been kept to a minimum to avoid bloat; instead, "adaptations for modern PCs" have mostly been achieved by means of libraries.

For example, BBC BASIC has no built-in support for anti-aliased graphics, but I supply a library aagfxlib.bbc for that. Similarly BBC BASIC has no (true) built-in support for 3D rendering, so I supply libraries for that. There are currently about 40 libraries supplied with BBC BASIC for SDL 2.0.

Bloat is undesirable for two main reasons. Firstly, the bigger the interpreter the bigger every 'compiled' application bundle has to be: every feature of the core language has to be included whether the program uses it or not. Secondly, cache efficiency is impaired if the interpreter occupies more memory than it needs to.

Libraries, however, are loaded on demand so they do not make the run-time memory footprint larger unless the program actually needs them.
It surprises me that the programming language for modern platforms is not adapted to the modern programming style.
If you are talking about the use of native, OS-supplied, GUI widgets, that is again a matter of libraries. BBC BASIC for Windows comes with libraries that support native Windows controls, whilst BBC BASIC for SDL 2.0 comes with libraries which draw such controls using the built-in graphics capabilities. This is not a function of the language, but of a choice made about its deployment on different platforms.

As far as I can understand your objections to BBC BASIC, they would be overcome by you, or somebody else, writing the libraries you need; I encourage the creation of third-party libraries! I realise that this may not be a practical solution, because neither you nor anybody else may have the time or inclination to do it, but it is the BBC BASIC 'way'.

If there are any shortcomings in the core BBC BASIC language which concern you, then I am more than happy to suggest solutions or (in an extreme case) consider extending the language - I recently added array slicing because I concluded that it was an important missing feature. But if, as it seems, it's a lack of suitable libraries I'll leave that to others.

Statistics: Posted by RichardRussell — Sat Mar 22, 2025 10:45 am



Viewing all articles
Browse latest Browse all 8162

Trending Articles