Page 1 of 2

OMG

Posted: Thu Jan 29, 2009 7:26 pm
by Sunday
hi,

i did a quick look at the source of react os. It is very awful. Did you ever heard of object oriented programming? Can anybody tell me, why there is no use of classes? Wouldn't it be better to not to copy the ugly sourcecode design of the original microsoft source and instead to improve all the stuff that really sucks at windows, implementing some nice features from other os (e.g. ubuntu, macos x, still with the binary compatibility)?

greetz

Re: OMG

Posted: Thu Jan 29, 2009 7:53 pm
by Lone_Rifle
To answer your questions, point-by-point:

first, most of the devs are of the notion that OO-programming would be a good idea, and would have done it this way were it not for the fact that g++ tends to be very substandard, to say the least. Hence gcc, hence C.

second, the aim of this project is binary compatibility. we're not going to achieve this with implementing features not found in Windows, or attempting to fix "stuff that really sucks at windows", as you put it. The former is pointless if applications written for Windows don't make use of them, the latter will probably break things in the applications written for Windows that depend on them.

If however you're referring to developing a better interface than windows (barring coming up with controls that aren't drop-in replacements to Microsoft's Common Controls), there's an ongoing discussion somewhere in the forums.

Re: OMG

Posted: Thu Jan 29, 2009 8:23 pm
by preston
zomg object oriented what?

but it's nice that you've registered just to tell us this. join our irc channel for more sophisticated discussion.

Re: OMG

Posted: Fri Jan 30, 2009 5:56 pm
by Z98
Not sure what makes you think that by just doing object oriented the code will somehow be cleaner. In fact, if you overuse it, you end up making things worse.

Re: OMG

Posted: Fri Jan 30, 2009 7:28 pm
by Ged
Sunday wrote:hi,

i did a quick look at the source of react os. It is very awful. Did you ever heard of object oriented programming? Can anybody tell me, why there is no use of classes? Wouldn't it be better to not to copy the ugly sourcecode design of the original microsoft source and instead to improve all the stuff that really sucks at windows, implementing some nice features from other os (e.g. ubuntu, macos x, still with the binary compatibility)?

greetz
What utter drivel...

Maybe if you started your question with a polite 'why does the reactos soure code not use object orientation' then I would have gone on to explain that OO is not necesseraly a good thing and it doesn't lend itself particularly well to operating system design.

However, due to your rudeness, I'm not going to educate you on your misconceptions.

LoneRifle is actually slightly wrong in his answer. We would only use OO is areas that warrant it, like the shell and applications.
For the rest of the OS, we would always use C.

I'll leave you with a little link to ponder over : http://www.theregister.co.uk/2009/01/21 ... ojects_08/

Re: OMG

Posted: Fri Jan 30, 2009 8:15 pm
by hto
One thing I don't like in the sources is that there is a tendency to use very long functions. Maybe it was right in the past, but not now.

Re: OMG

Posted: Fri Jan 30, 2009 9:13 pm
by Ged
yeah, most of those are from the good old days

Re: OMG

Posted: Fri Jan 30, 2009 9:42 pm
by Haos
implementing some nice features from other os (e.g. ubuntu, macos x
Like?

Re: OMG

Posted: Mon Feb 02, 2009 9:34 pm
by EmuandCo
If our code is sooo awful, then fix it and file patches into Bugzilla. Thank you

Re: OMG

Posted: Thu Feb 12, 2009 3:51 pm
by silverblade
Personally, I'd prefer it if the whole thing were written in C++. I find object-oriented code easier to understand the structure of and generally feel it to be more pleasant to work with.

I mean, Windows even uses objects internally, but uses its own system for handling the objects. It'd feel more natural to express these things using classes and such.

But, I can't force the project to have the whole thing to be rewritten in C++.

So I just follow the project standard coding by using C.

Re: OMG

Posted: Fri Feb 13, 2009 9:35 am
by Elledan
I can at least write my own code for ROS in C++, and have others port it to C if they really want it ;)

Posted: Fri Feb 13, 2009 4:22 pm
by hto
C, C++ — easy to make mistakes and then difficult to find what is wrong.

Let's have a formally verified kernel! :)

Re: OMG

Posted: Sat Feb 14, 2009 5:32 am
by Ged
silverblade wrote:Personally, I'd prefer it if the whole thing were written in C++. I find object-oriented code easier to understand the structure of and generally feel it to be more pleasant to work with
omg, I think I'd die, C++ is so far from OO it may as well be martian.
C++ is one of the worst languages I've ever had the misfortune to be confused by.
It's so ugly, it's so big and it's so uncontrolled that I bet my house even Bjarne Stroustrup doesn't even fully understand it.

There's a _very_ good reason complex software like operating systems is written in C.
Let's stick to C for low level programming, C# for OO and C++ for the insane

:)

Re: OMG

Posted: Sat Feb 14, 2009 10:35 am
by Elledan
Actually the core of C++ isn't that far removed from C. What confuses many people is that it is a hybrid language, i.e. it doesn't attempt to be fully linear like C, or fully OO like C#. I will give you that writing a compiler for C++ is a horror compared to many languages (Ada is a breeze). It is however perfectly possible to write a low-level application like an OS kernel with C++, you just need to limit yourself to the (more stable) C-like core and avoid OO. Which is basically how I use C++ all the time :)

Re: OMG

Posted: Sat Feb 14, 2009 5:44 pm
by RideBMX
Alan Key wrote:I invented the term Object-Oriented, and I can tell you I did not have C++ in mind.