Linked by Thom Holwerda on Fri 22nd Feb 2008 09:16 UTC, submitted by obsethryl
.NET (dotGNU too) "Previously, we have presented one of the two opensource licensed projects related to creating a C# kernel. Now it's the time to complete the set by rightfully presenting SharpOS, an effort to build a GPL version 3 + runtime exception licensed system, around a C# kernel of their own design. It is my pleasure and priviledge to host a set of questions and answers from four active developers of SharpOS, that is William Lahti, Bruce Markham, Mircea - Cristian Racasan and Sander van Rossen in order to get some insight into what they are doing with SharpOS, their goals, their different design and inspiration."
Thread beginning with comment 301981
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: So what ?
by dagw on Fri 22nd Feb 2008 12:31 UTC in reply to "So what ?"
dagw
Member since:
2005-07-06

Could anyone tell me what is so amazing about C# ?
Seriously, what wonderful things shall I wait for ?


It's not C# in and of itself that is "so amazing", although it seems to be a fairly well designed language. The cool thing is the CLR, C# is just a way of using the CLR.

Reply Parent Score: 2

RE[2]: So what ?
by J.R. on Fri 22nd Feb 2008 13:01 in reply to "RE: So what ?"
J.R. Member since:
2007-07-25

"Could anyone tell me what is so amazing about C# ?
Seriously, what wonderful things shall I wait for ?


It's not C# in and of itself that is "so amazing", although it seems to be a fairly well designed language. The cool thing is the CLR, C# is just a way of using the CLR.
"

Perhaps in this scenario (OS) its the CLR that is the cool thing, but I have to argue that C# (and the .NET class library) itself is rather amazing. Ofcourse you have to compare it with something in order to draw that conclusion.

For me, which are educated as C++ and Java programmer, I just love the fact that C# is as powerful as both those languages together. Its as simple (both in language features and level of abstraction) as Java, yet got all the features of C++ (unsafe code). It got a clean class library with the same features as Java's, but without all the legacy/compatibility code and overengineered factoryfactory factories classes...and much better feature-set than any C++ library I have ever used. Abstraction for rapid application development and readability, is worth its weight in gold for alot of programmers (especially in the enterprise market where it has to fit within the business models and so on...).

Last but not least, anyone still using C/C++ for applications and then gets rooted because some stupid buffer overflow can only blame themselves. It has been known for ages that code written in C/C++ WILL lead to these problems...even at the hands of experienced programmers. If you ever written a C++ code with more than 1000 lines, don't come here and tell me you never had dangling pointers, insufficient bounds checking, string formating errors, and what not in your code... I certainly have. Getting these kinds of problems OUT from the core of the operating system should be enough reason to embrace C# (or any other similar language) at once.

Reply Parent Score: 5

RE[3]: So what ?
by g2devi on Fri 22nd Feb 2008 19:51 in reply to "RE[2]: So what ?"
g2devi Member since:
2005-07-09

Buffer overflow and memory leaks are only a small part of the issues operating systems face. A more serious issue is general *resource* leaks (which C# can do nothing about that can't be done with even C) and excess memory usage which anything but referenced counted garbage collectors are notorious for having (memory is eventually recovered, but you in the m-allocated memory), treating different things the same (i.e. if you try to treat register memory the same way you treat swap memory, you're going to have serious performance and behavioral issues), ignoring the hardware to make developer's lives easier like using the stack exclusively in preference to fast registers (if you ignore the hardware, the hardware will ignore you).

IMO, writing an OS in Java or C# might be good for educational purposes and OSes where latency makes speed a nonissue (e.g. a distributed OS over a slow network) or when you have tonnes of memory and CPU to waste. But I don't see it reaching the desktop any time soon. But it *might* change with time. After all, anyone who's had a 1MHz Commodore 64 or Amiga 1000 knows that those seriously underpowered machines could do wonders because of their tight coding (which included now taboo performance techniques like self-modifying assembly code). Compared to those standards, these days, even Linux is a memory hog for the sake of maintainability and functionality.

OTOH, given that applications of the average user keep finding ways to stress memory and CPU (Compiz, Video processing, Human Genome projects, Weather prediction, etc) in ways that we didn't even think of 10 years ago and the fact that Moores law has a limit which which we might reach within the next five years (i.e. atomic level), I'm skeptical.

Reply Parent Score: 2

RE[3]: So what ?
by michi on Fri 22nd Feb 2008 20:22 in reply to "RE[2]: So what ?"
michi Member since:
2006-02-04

For me, which are educated as C++ and Java programmer, I just love the fact that C# is as powerful as both those languages together. Its as simple (both in language features and level of abstraction) as Java, yet got all the features of C++ (unsafe code).


C# does not have all the features of C++. For example, C++ has multiple inheritance and C++ templates are more powerful then C# templates. Of course one can argue that it is actually a good thing that C# does not have multiple inheritance and I partly agree. But other languages like Scala and, I think, D provide mixins, which gives you some of the possibilities of multiple inheritance without causing the problems that multiple inheritance can cause. C# also lacks some other powerful features like pattern matching, which is often found in functional languages, e.g. Haskell.

It got a clean class library with the same features as Java's, but without all the legacy/compatibility code and overengineered factoryfactory factories classes...and much better feature-set than any C++ library I have ever used.


Parts of the .Net libraries are crap, e.g. Windows.Forms. On the other hand, it is now replaced by WPF, which is really quite nice. Also, I found managed DirectX applications really hard to debug. If something goes wrong in your Shader code, you just get an "Error in application" exception, which is not helpful at all. At least the same code in OpenGL and C++, the error message includes a line number. And Qt is a C++ library, that more or less has the same feature set as the .Net class libraries. Qt4.4 even includes a multimedia API (Phonon), has its own HTML rendering engine (based on Webkit) and can render widgets on a canvas, similar to what you can do with WPF.

If you ever written a C++ code with more than 1000 lines, don't come here and tell me you never had dangling pointers, insufficient bounds checking, string formating errors, and what not in your code...


You can avoid many of these problems by using a decent framework like Qt, which does most of the memory managment for you and which has powerful string classes. Also there are numerous smart pointer classes which solve most of the memory related problems.

That sad, I also think C# is a decent language and I like programming with it. But C# and the .Net framework is certainly not perfect and there are other languages which are better than C# in certain areas like Haskell, Scala etc.

Reply Parent Score: 2