Page 1 of 1

New programming language for OS Development

Posted: Thu Sep 02, 2010 7:42 am
by AlfaOmega08
Anyone, sooner or later, gets to the point of getting lost in the meanders of the source code of your operating system.
It is normal to have difficulty managing the code as the project grows in number of files and features. This is mainly in the ability of the programmer to keep the code as clean and tidy as possible. However, despite efforts, you will find yourself always lost in a hell of sources and headers.
I believe that the choose of the programming language for the project will influence this a lot. For example I find C# and Java a lot (and a lot) tidier than C or C++, just for the fact that headers are not-existant. You don't have to edit the header everytime you add a new method or variable to the class. Each class is kept in a single file.

Hence my attempt to define (and eventually build) a new programming language adapt for larger projects, in particular oss. I would really appreciate a C#-like language. Obviously instead of compiling in the Common-Intermediate-Language it would compile to x86 asm or whatever ready and runnable for your CPU.

What do you think? Am I right or wrong? Why?
Would you like to try to create such a language?

Re: New programming language for OS Development

Posted: Thu Sep 02, 2010 8:46 am
by NickJohnson
Why not write a tool to automatically generate a header containing all of the function/class prototypes in your project just before compiling? That would be a ton easier than writing a whole new language.

Also, I find headers actually beneficial: they provide a good format for designing subsystems and libraries sort of "by contract", by defining their interfaces before writing any code. Regardless of how you use them, maintaining headers should be minor bookkeeping in comparison to writing actual code.