Talk:C Sharp

From OSDev Wiki
Jump to: navigation, search

Too short an answer?

I think the remark that you (only) need a interpreter is slightly misleading. Yes you can write an OS in C#, No you can't cleanly do it in pure C#. You need assembly to access processor stubs, and possibly a higher language (c++) to run the CLI interpreter. And memory management for the object-oriented part. And probably several other runtime thingies I can't foresee because I don't know the implementation details of the language. I therefore think that a remark about the feasability is at its place. Also, could someone with in-depth knowledge of the ABI give some ideas what the runtime part actually involves. - Combuster 14:59, 31 March 2008 (CDT)


I really think this deserves more than a simple link. Cosmos is not just some OS project, it's OS kit. I think this is probably where we should be pointing people to when they ask "can I write my own OS in C#". It appears to make things super easy, even for unexperienced OS devers --Earlz 22:02, 10 December 2012 (CST)

I'm slightly biased here so I will try to keep my arguments as neutral as possible. The mention of Cosmos (and other C# OSes) in the article is in a section that highlights the compilation strategy employed by them (i.e. relying on .NET csc/mono mcs to compile to CIL and then AOT compiling the kernel to machine code) as opposed to the Singularity approach (a variant of C# directly compiled to machine code) rather than to provide a list of C# OSes per se. I'm sure we could keep a link to C# OSes at the bottom of the article explaining the differences between them if you like, or possibly put it in a separate article etc.
Secondly, I have some reservations about making Cosmos the first point of call for beginners wanting to write a C# OS. IMHO the first point of call should be the Languages article which essentially says 'you can't or its very difficult'. The Cosmos project provides an excellent kernel itself which you have to instantiate and you can then call functions from the standard .NET library like Console.WriteLine etc (as shown in the screenshot on their site). In this sense, pointing people to it would be akin to replacing our Barebones or Babystep tutorials with a link that simply points to a C kernel with integrated C library and then saying build upon this - it it no way teaches people how to write an OS (by which I mean the low level hardware interface code and memory management + scheduling + IPC etc).
However, this is a wiki and a democracy therefore please don't be afraid to make any changes you want (with the proviso people may change your edits). - John 16:13, 11 December 2012 (CST)
Personal tools