I'd like to give my opinion as a 100% self-taught software developer that first learned to program at 13 on TRS-80/Z80, Tandy COCO/Motorola 6809, Atari 800/(I believe)Motorola 6502, Apple II/Motorola 6502, Mattel Aquarius/Z80 (btw, first computer I actually owned and to me at 14, the most expensive thing I had ever owned - I had to save paper-route money for months to afford the $100.00 cost at Kaybee Toys) etc.
All of these I initially learned to program using BASIC; however, with peek/poke (and hand assembling from mnemonics, to hex, to decimal), and later purchasing/obtaining assemblers, I rapidly moved into assembly programming.
I've heard many say that BASIC was a high-level language akin to Python, JS, etc. That is just not the case in my experience. First, BASIC was STRONGLY TYPED. For the most part, in most dialects, there were 3 types: Numbers (which were floating point or sometimes BCD behind the scenes), Strings, and Arrays. There were no other types and a variable was a specific type designated by a sigil/suffic ($ for Strings, nothing for numbers, or arrays). It mostly worked like assembler in that you had "goto" which was equivalent to "jmp" instruction, "gosub" which was equivalent to "longjmp/ret", simple loops, simple conditionals, etc. which all mapped very directly to the underlying CPU instructions. Line numbers were nothing more than equivalent to assembler labels that could be jumped to. Also, with peek/poke/call you could effectively do anything the hardware supported. This was the equivalent of "inline assembler" that easily permitted you to create the equivalent of "intrinsics" and there wasn't anything the hardware could do you couldn't access from BASIC.
With that being said, if we, as children could learn programming and even the low-level details of CPU's, the intricacies of different bases of numerical representation, graphics, etc., with NO ASSISTANCE AT ALL (other than the library) using those tools, there is absolutely no reason whatsoever that one cannot learn to program, from scratch, using Rust (especially given all the resources available without even having to get out of your chair).
I 100% believe (know) that a motivated, reasonably
not dumb talented adolescent (or even a somewhat more than above average pre-adolescent) can, and should, learn to program and learn about computers using something like Rust. It ticks all the necessary boxes. The ONLY think that is needed, is a gentle tutorial with some motivating, simple examples and explanation for such a child to follow, which include:
- How to say, "Hello Word!"
- How to print your name
- How to print your name repeatedly with line-wrapping such that it creates interesting patterns as the screen scrolls
- How to do some basic arithmetic operations (along with a short tutorial/explanation of number-bases, binary, hexadecimal, and octal representation)
- How to define and user variables
- Integer and String types (later other primitive types, then types in general)
- Basic loops (for over ranges for the most part to start)
- Basic conditionals (like if/else)
- Defining simple functions (using only Integer/String Types)/Calling them and getting the return value (equivalent of BASIC gosub)
- How to use a simple graphics library and draw some basic 2D graphics with some color
- How to play some basic sounds or music through an API (something like putting note names in a string along with durations for each note, passing it to a simple API call and having it play asynchronously) along with optional parameters for things like attack, decay, etc.
- Some pointers on where to find more information and resources (like this forum, the "Book", other tutorials, exercises (age appropriate), etc)
- How to do some simple inline assembly and how to use intrinsics
That's it. That is all that is needed. From there, the sky is the limit for anyone who really wants it. Most (if not all) of it already exists.
The notion that Rust can't, or shouldn't, be ones first language is a non-starter in my book. I believe (strongly) that not only can it be first, but it should be first.