LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2003, 09:53 PM   #31
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30

Quote:
Originally posted by thebassist
Java is more like objective C then C++ I'd say.
languages are languages though, and once you understand what needs to be done, finding out how the language does it is easy.
I think anyone who has a grasp of C++ at all would easily be able to understand java code.
The problem I'm having with writting things in C++ right now is that it seems like half the time I have to jump back to C. For certain functions that are not implimented in C++ libraries, or to communicate with the OS. I'd just rather write the hole thing in one language.
As far as windows being based on C++, I think it's like a high bred. Some things are in C++ and some are in C. Windows (MS) uses the COM model for as much as they can. Which is an OO model, making it appear as though the whole OS is OO. I think that's right.
eh
L8er
Through COM you can work with objects but working with Windows GDI, you use a C function interface. None of the MS Windows source code is Standard C++ and the orgainization of the architecture is object-based but not object-oriented. It's insane to think of MS Windows as a C++ architecture as others on this thread claim. See the 'Choices' link above, for an example of an object-oriented platform written in Standard C++, note the architectural description or if you know Java than that can be a good example as well.
 
Old 05-15-2003, 09:55 PM   #32
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30
Okay here is a real object oriented platform architectural design:

Quote:
Choices is written as an object-oriented operating system in an object-oriented programming language C++. As an object-oriented operating system, its architecture is organized into frameworks of objects that are hierarchically classified by function and performance. The operating system is customized by replacing subframeworks and objects. The application interface is a collection of kernel objects exported through the application/kernel protection layer. Kernel and application objects are examined through application browsers. Choices runs on bare hardware on distributed and parallel computers. Virtual Choices (VChoices) also runs under UNIX System V.

Our object-oriented system architecture embodies the notion of customizing operating systems to tailor them to support particular hardware configurations and particular applications. Customization is structured through the use of inheritance. We have applied this approach to virtual memory, message passing systems, file systems, distributed virtual memory, scheduling, and machine dependent software.

Choices has, as its kernel, a dynamic collection of objects. It supports an object-oriented application interface based on local and distributed objects, inheritance, and polymorphism. System resources, mechanisms, and policies are represented as objects that belong to a class hierarchy. Subsystems of Choices are designed as frameworks of classes. Frameworks have been built for virtual memory, memory management, process management, file storage, exceptions and hardware device drivers, and distributed processing and communication. Choices runs on bare networked SPARCstations, shared memory Encore Multimaxes, personal computers using the Intel 386 and MC68030 processors, as well the Tapestry hypercubes. Virtual Choices is a version of Choices that runs on the UNIX ``virtual machine''. Here is a partial list of other Choices publications.

Our most recent results have been in the areas of adaptive file systems that provide different caching and network protocol support depending upon the behavior of applications and a fast process migration facility. Currently, we are working on a new version of our system called Micro Choices. If you have questions or comments about the Systems Software Research Group send them to

Last edited by GtkUser; 05-15-2003 at 09:57 PM.
 
Old 05-15-2003, 11:35 PM   #33
thebassist
LQ Newbie
 
Registered: Apr 2003
Posts: 6

Rep: Reputation: 0
interesting OS. FIrst time I've heard of it.
Another extremely OO OS would be OSX, now I say this but the OO portion really has more to do with the Cocoa interface.
I've programed for Cocoa, and as far as API's go it's just about the easiest one to work with. After reading through the Cocoa programing book, understanding some of the decisions made, and expriomenting with Cocoa, I have a new respect for the guys at neXt. Amazing stuff, and the whole interface is flawlessly OO.
I think the most interesting thing is the relationship between Mach's mailbox messge passing, and the Objective-C message passing. Talk about a smooth transition from high to low level instructions. I'm not sure how much of the kernel is actually OO, from what I gather it's mostly freeBSD front end stuff atop the mach microkernel. Which would bring a lot of non OO stuff into the mix, however, almost everything else I believe is OO based.
 
Old 05-15-2003, 11:38 PM   #34
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30
I think that Be was another platform implemented in Standard C++, but I'm not 100% sure.

Last edited by GtkUser; 05-15-2003 at 11:46 PM.
 
Old 05-15-2003, 11:44 PM   #35
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30
Quote:
Date: Sun, 27 Apr 2003 21:06:07 -0500

Quoting Dean Kutryk <trollking@shaw.ca>:

> Is it impossible to design an object oriented platform? Linux kernel
> components are implemented in C, and Microsoft Windows kernel components
> are object based, there is a micro-kernel, and messages are delegated by
> the micro-kernel to other components, but the Microsoft system interface
> (@in32) is not object oriented. (or so I understand)

Unix was designed and its main interfaces defined before C++ was invented.
Linux is simply a clone of that.

There are C++ is windows, but again, all the key interfaces are pre-C++.
The .Net interfactes stuff are all in what MS consider good OO; that is, Java
like with C# oddities.


> Well on Microsoft you can use MFC, a C++ library which wraps Win32 data
> types and function pointers. And on Linux, you can use Gtkmm (a C++
> library) which is a wapper of Gtk+ widgets. Do you think that this would
> change if these platforms where object oriented. Should it change?
>
> And to further complicate the matter. With Java and .Net middeware, it
> appears that we have an object oriented user mode platform. Say that the
> core language of these middleware platforms was Standard C++. Would
> Standard C++ be influenced positively by object oriented frameworks? How
> can Java developers (book writers) make a claim that the Java language
> is better than C++ in certain respects when they are comparing framework
> libraries to wrapper libraries, and not the core languages?

I don't think that the wrapper vs in-depth issue can be decisive. Anyway, the
Java community is out on a crusade that doesn't leave much room for rational
discussion or tradeoffs. For an illustrative example, re-read the original
Java whitepaper.

There are C++ OSs, such as Choices, Chorous, and Be.

I think the C++ community has better things to do than to produce "true C++"
versions of what already works. What can be done, and is occationally done
well, is to provide systems with useful new functionaity where the C++
facilities are most helpful in providing the new.
 
Old 05-15-2003, 11:50 PM   #36
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30
Personally though I disagree with Bjarne Stroustrup, because I think that one of the great advantages of a framework architecture would be the increased ability to easily maintain the platform and customize it.
 
Old 05-16-2003, 07:35 AM   #37
llama_meme
Member
 
Registered: Nov 2001
Location: London, England
Distribution: Gentoo, FreeBSD
Posts: 590

Rep: Reputation: 30
Those C++ OSs sound interesting. I'm waiting for the first OS to be written in a lazy functional language though...now that would be cool

I think you make a good point about object-based vs. object-oriented design - even COM has no concept of inheritance (so I've heard). Virtual functions and so on can give a performance hit, though, so perhaps that's why people have been reluctant to use this kind of design in kernels. Although *NIX kernels are written in plain C for "historical reasons", of course.

Alex
 
Old 05-16-2003, 04:16 PM   #38
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30
Virtual functions use dynamic binding, however I don't think that performance is going to suffer very much at all from an OOP platform. The advantages in organization, accessibility, reuse, etc, outweigh any cost.

The fact of life though is that people are stuuuuuuuupid! They would rather defend legacy platforms because they are lazy and don't want to learn how to program. I think that Linux supporters are not much different than Microsoft supporters. The thing you have to learn how to do is to invest money. Once you have a million dollars, who cares about the stupid things that people always do. I don't mind supporting Microsoft because people do it to themselves.

Last edited by GtkUser; 05-16-2003 at 04:18 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[c] unix systems programming in MS VS C++? saiz66 Programming 2 10-07-2004 08:16 AM
c programming in unix dilberim82 Programming 7 04-21-2004 04:32 PM
UNIX (Linux, BSD, etc) Programming :: UNIX kuphryn Programming 8 04-04-2004 11:50 PM
Why didn't [UNIX] monopolize the [computer] market while it had the chance? cparker15 Linux - General 10 03-21-2003 01:17 AM
unix programming questions eboats General 7 10-18-2001 05:48 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration