Hi,
Antti wrote:My previous post was quite bad if taken out of the context. The main point is simply that beginners should be able to use the same tools as professionals. It is possible if the programming language is easy to learn. I guess Brendan is heading to this direction.
I like the idea of "Everything should be made as simple as possible, but not simpler."
My language is intended as a low level language (for writing boot code, kernels, device drivers, etc). There are 2 things (pointers and assembly language) that are needed for low level work and can't be removed without making it "simpler than possible". These same 2 things are the only things that make it unsafe, and they also make it "not as simple as possible" for high level work.
My plan is to create a higher level language later on (for things like scripting, etc) by removing assembly language and pointers and adding whatever is needed to fix the problems this causes (e.g. garbage collection); so that the high level language and the low level language are mostly the same where possible. People (beginners) would learn the high level language, and then learn pointers and memory management, and then (maybe) learn assembly.
Now for a few things that might seem strange. First; I've already mentioned elsewhere that the OS will use "file format conversion" to automatically convert files from one format (e.g. source code) into a different format (e.g. native executables). This means that source code can be executed "as is" (where compiling to native is just a side-effect of executing it the first time).
Second; my OS will use a GUI and there won't be any command line. Applications will be split into pieces (processes); including having a "front end" (user interface) process that talks to a "back end" process. These pieces will communicate with messages. If the user clicks on some sort of "record macro" button; then the OS can record the messages sent from each application's "front end" to its "back end" while the user is using applications like normal. When the user stops recording their macro, the recording would be converted into high level source code (mostly a bunch of "send message" calls, although it's not quite that simple). The "macro recording" (which is high level source code) would be used as is - e.g. double click on the recording, and the OS compiles it to native and executes it for you, and it repeats all the actions you recorded (by sending those messages to the application's "back end" without starting the application's "front end" at all). The "macro recording" (which is high level source code) could also be opened in the IDE and edited.
Imagine a normal user (no programming experience) that happens to do the same things relatively often. They're going to record little macros to speed up their work; but (apart from some very simple things) those little macros probably aren't going to be quite powerful enough. They might figure out that (by learning some high level language) they can add dialog boxes or loops or something, and make their macros a bit more powerful and automate more. Then learn some more high level programming, and start improving their code and adding more functionality. Maybe with a few simple functions they can avoid the need to use an existing application's "back end" and speed it up. Maybe their colleagues need something similar so they add some options for a few different cases. Before they realise it, they've written a simple application. As time goes passes they do more, and learn more. Maybe one day they buy some new hardware, find out the OS has currently doesn't support a few devices, and they realise device driver programming isn't much different to application programming and end up writing an ethernet card driver.
The end result is that people accidentally become programmers - not because they feel like spending several years and tens of thousands of $$$ by going to university, but because it's easy.
Of course I am exaggerating here. Some people won't be interested at all, some people might learn a little (e.g. simple macro tweaking) and not learn more. It also won't be that simple to make the transition from "normal user" to "advanced programmer" - they're going to need nice user friendly tools, and example code to learn from, and people to help them, and well written tutorials that explain various things (like algorithms, event based programming, concurrency, etc), and kernel API and messaging protocol reference guides. All of that can be provided easily enough though (most can be part of the default OS installation, half can probably be built into the IDE, etc).
Cheers,
Brendan