Wasn't this what the One Laptop Per Child (OTLP) project was trying to achieve? The problem is that when the ZX, C64 etc were around there was no alternative. If you wanted to play games, you could either shell out for more hardware and purchase the games on disk or cartridge, or you could type them in from a magazine (several times) and hopefully save them to a cassette.
These days, if you want to play a game, you reach for your phone and install a free one that is far more capable than anything you could develop yourself.
The real trick would be to create a development environment that will run on a phone. Apple have gone somewhat down this path with their Swift Playgrounds and you could always work with Scratch and similar systems or you could even do something in html/javascript, but none of these really give the same imperative to learning how that the original home computers did. You really need a system that lets you develop a full program, share it with your friends and modify (and break) it.
You know the reality is that we do have these systems, and kids that are interested in doing anything other than just playing games can access them with a minimum of problems. I wonder how many of those ZX Spectrums, C64 etc were given to kids, who on finding that they had to actually do some work to make them do anything useful relegated them to a shoebox under the TV. It is possible that for every positive story about "kid learns programming from ZX Spectrum" you would have a hundred stories of kid calling ZX Spectrum a piece of crap.
In my experience, that tended to happen more with the kids who got the C64s. Those were the ones with color TVs and Betamax at home, too.
There was a third possibility: you could figure out how the game worked and write your own version from scratch. I learned so much about programming by writing a Pac-Man clone on a ZX Spectrum simply because I didn't have the pocket money to keep feeding the arcade machines, or even to buy someone else's knock-off version on a cassette tape. I quickly got bored of typing in other peoples' programs from a magazine, much more fun to write your own.
My memory, it was generally true about the C64/ZX split being about gamers vs coders; however I did know some "Speccy" owners (generally with slightly-better-off parents) who had lots and lots of different games on tapes and did nothing but play games on the machine. Yes, I "borrowed" a lot of games by copying the tapes on an Amstrad dual-cassette stereo system (thank you, Sir Alan!) but I'm really glad that generally, scarcity of an "easy option" forced me into a place where I had to write my own code.
I agree. When there is no shortcut you find much more motivation to go the hard way. I was in that exact position when I was 10, and I kept messing up copying the basic lines from books so I got a book for kids that teached me basic, this way I was making my own code and could debug it. I made simple games completely from scratch that way it was how I got into programing.
I can understand that now with so many shortcuts available for kids the same motivation is not there anymore. It's like once you get access to cheat codes in a game that makes you invincible and gives you infinite money, the challenge is not there and you lose interest.
I remember games that had a note on the back of the box asking for programmers to send their work to the publisher's address for consideration. Magazines advertised commercial software obviously sold by one guy out of his house, and featured interviews with programmers who were only a few years older than me. If you owned a home computer and could program it, you imagined you could access this growing and exciting world, and maybe make some money.
Bloat is the moat were stuck in.
An unsustainable sin,
a cognitive load,
too heavy to comprehend,
a house of cards,
the opposite of smarts.
With early Sinclair systems, each key on the keyboard would act like modern auto-complete: you would start typing and keywords would appear almost magically. On the BBC Micro, you powered on and heard the trademark beeeeep-beep and were instantly presented with a prompt where you could start typing a program or other commands. Everything in those systems was geared towards immediate responses and inviting you to start programming them straight away.
OTH... Taking a RPI400, and build a stripped-down linux system which resembles Sinclair BASIC could prove to be a fun exercise.
Edit: I just realized how expensive the ZX81 was here in Germany back in 1981 - it'd set you back 450€ by todays value.