OMG

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Sunday
Posts: 1
Joined: Thu Jan 29, 2009 7:10 pm

OMG

Post by Sunday » Thu Jan 29, 2009 7:26 pm

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

Lone_Rifle
Test Team
Posts: 802
Joined: Thu Apr 03, 2008 2:17 pm
Contact:

Re: OMG

Post by Lone_Rifle » Thu Jan 29, 2009 7:53 pm

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.

preston
Developer
Posts: 272
Joined: Wed Sep 27, 2006 8:19 pm
Location: Prague, Czech Republic

Re: OMG

Post by preston » Thu Jan 29, 2009 8:23 pm

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.

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Re: OMG

Post by Z98 » Fri Jan 30, 2009 5:56 pm

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.

Ged
Developer
Posts: 925
Joined: Thu Sep 29, 2005 3:00 pm
Location: UK

Re: OMG

Post by Ged » Fri Jan 30, 2009 7:28 pm

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/

hto
Developer
Posts: 2193
Joined: Sun Oct 01, 2006 3:43 pm

Re: OMG

Post by hto » Fri Jan 30, 2009 8:15 pm

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.

Ged
Developer
Posts: 925
Joined: Thu Sep 29, 2005 3:00 pm
Location: UK

Re: OMG

Post by Ged » Fri Jan 30, 2009 9:13 pm

yeah, most of those are from the good old days

Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Re: OMG

Post by Haos » Fri Jan 30, 2009 9:42 pm

implementing some nice features from other os (e.g. ubuntu, macos x
Like?

EmuandCo
Developer
Posts: 4323
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: OMG

Post by EmuandCo » Mon Feb 02, 2009 9:34 pm

If our code is sooo awful, then fix it and file patches into Bugzilla. Thank you
Image
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

silverblade
Developer
Posts: 58
Joined: Sat Dec 18, 2004 9:41 pm
Location: Newbury, UK
Contact:

Re: OMG

Post by silverblade » Thu Feb 12, 2009 3:51 pm

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.
Andrew / Silver Blade

Image

Elledan
Posts: 363
Joined: Sat Jan 01, 2005 3:18 pm
Location: Netherlands
Contact:

Re: OMG

Post by Elledan » Fri Feb 13, 2009 9:35 am

I can at least write my own code for ROS in C++, and have others port it to C if they really want it ;)

hto
Developer
Posts: 2193
Joined: Sun Oct 01, 2006 3:43 pm

Post by hto » Fri Feb 13, 2009 4:22 pm

C, C++ — easy to make mistakes and then difficult to find what is wrong.

Let's have a formally verified kernel! :)

Ged
Developer
Posts: 925
Joined: Thu Sep 29, 2005 3:00 pm
Location: UK

Re: OMG

Post by Ged » Sat Feb 14, 2009 5:32 am

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

:)

Elledan
Posts: 363
Joined: Sat Jan 01, 2005 3:18 pm
Location: Netherlands
Contact:

Re: OMG

Post by Elledan » Sat Feb 14, 2009 10:35 am

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 :)

RideBMX
Posts: 76
Joined: Sat Dec 15, 2007 7:38 pm
Location: New York

Re: OMG

Post by RideBMX » Sat Feb 14, 2009 5:44 pm

Alan Key wrote:I invented the term Object-Oriented, and I can tell you I did not have C++ in mind.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 3 guests