mystran wrote:
What would I need to change in say Python, Visual Basic or Prolog to be able to program an OS with it?
I think... If one would want to write an OS with high level/interpreted only/both languages like python, visual basic or prolog, they should be completely refitted.
If you are thinking it seriously, they should be refitted so that they allows you to compile them to machine native code, while retaining the most important capabilities of theirs. Important capabilities like interpretability.
Actually, I recently started reading OsFaq wiki and intel manuals because of project which slightly goes trough this topic. My first step in the project would be to write backbone for x86 instruction assembler in FORTH. One which allows me to compile forth code for both Real- and ProtectedMode. It'd allow me to write all the code in forth, making assembly languages like NASM, FASL and GAS obsolete for OS programming.
My reasons for picking up forth:
- Very simple design, implementation is so simple that you could possibly stuff it into 510 bytes.(not necessary thought)
- Flexible, while forth is very good on hardware level programming, it has the ability to program itself and extend to much higher level than... for example java is.
- Interpretability, forth is fully interpretable, therefore allowing completely different style of programming to be used after it has been embedded into kernel.
- Reliability, the upper characteristics casts very high reliability as the side-effect, because you can test the code completely in the fly and know exactly what it does, you can be sure the code really works when you leave it and start building on it.
There are consequences as well, which I don't yet know so well. The most well known bad thing about forth is that very few people actually knows anything about it, and even fewer knows how to program with it. Because important components aren't lines but words, people may encounter some difficulties in learning it.
From forth syntax, I can possibly also continue to even more abstract syntaxes, like LISP, which I again can use to represent AST trees and build any language I want on top of it.