OOP Language for OS Development

K

KingIshu

Hi All,
I am developing an object oriented OS code-named "ikbocs".
1) What are the pros and cons of the following languages interms of
Effectiveness on System Programming, Object Orientedness etc ?
(Simula, Smalltalk, Modula-3, Eiffel, Sather, C++)
I suppose Java is not suitable for Sys. Programming.

2) Which OOP language would be better for OS development?

TIA
KingIshu
 
C

Claudio Puviani

KingIshu said:
Hi All,
I am developing an object oriented OS code-named "ikbocs".
1) What are the pros and cons of the following languages interms of
Effectiveness on System Programming, Object Orientedness etc ?
(Simula, Smalltalk, Modula-3, Eiffel, Sather, C++)
I suppose Java is not suitable for Sys. Programming.

2) Which OOP language would be better for OS development?

This is off-topic in comp.lang.c++ and very likely in every other newsgroup you
cross-posted to.

Claudio Puviani

P.S.: yawn @ the 3000th kid who says he's writing an OS
 
M

Martin Krischik

KingIshu said:
Hi All,
I am developing an object oriented OS code-named "ikbocs".
1) What are the pros and cons of the following languages interms of
Effectiveness on System Programming, Object Orientedness etc ?
(Simula, Smalltalk, Modula-3, Eiffel, Sather, C++)
I suppose Java is not suitable for Sys. Programming.

Pros for Ada:

Ada has been created for embedded programming and as such is suitable for
system programing.

Ada's representation clauses alow you to specify the pyhsical layout of
*any* datatype. Important for maping hadware interfaces.

Ada's units are based on bit not byte so exotic data types (like 4 bit enums
and 12 bit integers) are handled by the language. No need for complex bit
shifting.

Ada is very strict so many programing mistakes are found at compile time.
Very heplfull since debugging an operating system is quite painfull.

Ada checks for null pointer and protects against buffer overruns as well as
range over- and underruns. No need to add asserts all over the code.

All checks metioned above can be switched off when speed os more important
then robustness.

Ada 95 supports all major OO features as well a generic programing
(templates).
2) Which OOP language would be better for OS development?

Answering that question will only lead to a flame war - so I hope nobody
does.

With Regards

Martin
 
S

Steven T. Hatton

KingIshu said:
Hi All,
I am developing an object oriented OS code-named "ikbocs".
1) What are the pros and cons of the following languages interms of
Effectiveness on System Programming, Object Orientedness etc ?
(Simula, Smalltalk, Modula-3, Eiffel, Sather, C++)
I suppose Java is not suitable for Sys. Programming.

2) Which OOP language would be better for OS development?

TIA
KingIshu

I'll rephrase this question in terms that won't make the conservative
reactionaries go bonkers. I'm also removing crossposts. Let's ask the
question:

is C++ a good programming language for writing an OS?

I will qualify what I say by informing you that I don't have a lot of hands
on experience with C++.

My answer. Yes. But then I have to go a step further and ask what do you
mean by OS? The only parts of a computing environment that really
constitute the OS are the kernel and the device drivers. Since C++ has all
the low level capabilities of C, then it is clear that you can write and OS
in C++. But now let me share what Linux Torvalds said in 1998 (in terms of
computer technology that's a lifetime ago):

http://www.linuxgazette.com/issue32/rubini.html

Alessandro: "Many people ask why the kernel is written in C instead of C++.
What is your point against using C++ in the kernel? What is the language
you like best, excluding C?"

Linus: "C++ would have allowed us to use certain compiler features that
I would have liked, and it was in fact used for a very short timeperiod
just before releasing Linux-1.0. It turned out to not be very useful, and I
don't think we'll ever end up trying that again, for a few reasons.

"One reason is that C++ simply is a lot more complicated, and the
compiler often does things behind the back of the programmer that aren't at
all obvious when looking at the code locally. Yes, you can avoid features
like virtual classes and avoid these things, but the point is that C++
simply allows a lot that C doesn't allow, and that can make finding the
problems later harder.

"Another reason was related to the above, namely compiler speed and
stability. Because C++ is a more complex language, it also has a propensity
for a lot more compiler bugs and compiles are usually slower. This can be
considered a compiler implementation issue, but the basic complexity of C++
certainly is something that can be objectively considered to be harmful for
kernel development."



You can google up more of Linus's arguments if you like. I'll just say
this. If you are going to write a kernel in C++, you *_must_* know how all
the features you are using are implemented at the hardware level. I've read
enough of the C++ Standard to know you /can/ have very tight control over
things such as memory allocation. My guess is Linus simply hasn't taken the
time to master C++.

If you don't already know C++, you probably need to put off starting your OS
for about 6 months to 2 years while you learn the details under the hood of
C++. BeOS may be worth taking a look at. I don't know how much of their
code is available to the public. I'm also not sure what the balance between
C and C++ is. I'm pretty sure they use both.

Windows NT was originally written in C using Microsoft inhouse extensions to
support OOP. You should find Helen Custer's, now ancient, _Inside Windows
NT_ to be informative reading. I really don't know what MS use for the
kernel of NT these days.

If I were to take on your task, I would probably take an approach similar to
the NT model, but also do thing very differently in a lot of ways. For one,
I would use a Unix model for the file system hierarchy. I would tell you
what I really think of the file system support in NT/XP except my ISP would
probably yank my service.

At the bottom, way down deep, I would have an object with a function in a
running a continuous loop called an event loop. I would represent the
hardware system as an object, and try to find the best way to abstract
services such as file systems, network access, etc. In that respect, I
would probably look to Linux for examples.
 
I

Ioannis Vranos

KingIshu said:
Hi All,
I am developing an object oriented OS code-named "ikbocs".
1) What are the pros and cons of the following languages interms of
Effectiveness on System Programming, Object Orientedness etc ?
(Simula, Smalltalk, Modula-3, Eiffel, Sather, C++)
I suppose Java is not suitable for Sys. Programming.

2) Which OOP language would be better for OS development?


I 'll talk about C++ which is the language i know about. Both runtime and
space efficiency was one of its design criteria. Abstraction facilities do
not impose additional run-time or space cost than equivalent C-style code.
"It leaves no room for a lower level programming language (except
assembly)".

It supports the OO paradigm, generic programming paradigm (templates),
modular programming paradigm (namespaces) and procedural paradigm. Each
paradigm is supported *well* and with space/run-time efficiency.

Actually those are the reasons that i decided to learn C++ after i learned
C. I think C++ is the best language out there and this not because of
language fanatism.



References:

http://www.research.att.com/~bs/esc99.html
http://www.research.att.com/~bs/bs_faq2.html
http://www.research.att.com/~bs/






Ioannis Vranos
 
?

=?ISO-8859-1?Q?Thomas_Gagn=E9?=

Smalltalk has already been used for building an operating system so you
can either use that as a benchmark showing it can be done, or a reason
to do it in another language to prove it can be done with it as well.
 
I

Ioannis Vranos

Ioannis Vranos said:
I 'll talk about C++ which is the language i know about. Both runtime and
space efficiency was one of its design criteria. Abstraction facilities do
not impose additional run-time or space cost than equivalent C-style code.
"It leaves no room for a lower level programming language (except
assembly)".

It supports the OO paradigm, generic programming paradigm (templates),
modular programming paradigm (namespaces) and procedural paradigm. Each
paradigm is supported *well* and with space/run-time efficiency.

Actually those are the reasons that i decided to learn C++ after i learned
C. I think C++ is the best language out there and this not because of
language fanatism.



References:

http://www.research.att.com/~bs/esc99.html
http://www.research.att.com/~bs/bs_faq2.html
http://www.research.att.com/~bs/



And of course http://www.research.att.com/~bs/bs_faq.html






Ioannis Vranos
 
L

Luke Guest

KingIshu said:
Hi All,
I am developing an object oriented OS code-named "ikbocs".
1) What are the pros and cons of the following languages interms of
Effectiveness on System Programming, Object Orientedness etc ?
(Simula, Smalltalk, Modula-3, Eiffel, Sather, C++)
I suppose Java is not suitable for Sys. Programming.

2) Which OOP language would be better for OS development?

You don't have to use an OO language to develop an OO OS. When I get back
onto my OS project, it will be written in Ada, it will be an OO OS, but it
will not be using tagged types (classes).

You need to define what you want your OS to do first, then decide what
language will help you to achieve this goal. You will need some assembly
language in there, and maybe some other languages may creep in ;-) Who
knows?

Luke.
 
C

Christopher Benson-Manica

Claudio Puviani said:
P.S.: yawn @ the 3000th kid who says he's writing an OS

Well, you can't really blame people for trying - I mean, women really
gravitate to you when you write an OS. Just ask Linus Torvalds ;)
 
C

Claudio Puviani

Christopher Benson-Manica said:
Well, you can't really blame people for trying - I mean, women really
gravitate to you when you write an OS. Just ask Linus Torvalds ;)

So long as it's for reproductive purposes, I suppose I'll let it pass. ;-)

Claudio Puviani
 
E

Ender Everett

KingIshu said:
Hi All,
I am developing an object oriented OS code-named "ikbocs".
1) What are the pros and cons of the following languages interms of
Effectiveness on System Programming, Object Orientedness etc ?
(Simula, Smalltalk, Modula-3, Eiffel, Sather, C++)
I suppose Java is not suitable for Sys. Programming.

2) Which OOP language would be better for OS development?

TIA
KingIshu

Whichever one you understand the finer points of best.
 
E

EventHelix.com

2) Which OOP language would be better for OS development?

At this point C++ would seem to be the best choice. I don't think any other
language would match C++ in performance and power.

Besides, many operating systems have already been written in C++.

Sandeep
 
M

Martin Krischik

EventHelix.com said:
At this point C++ would seem to be the best choice. I don't think any
other language would match C++ in performance and power.

This statement is of corse useless unless you state which progamming
languages you a firm with.

I for example a firm in C++, C, Java, Modula 2, Pascal and Ada and would use
Ada if I ever wanted to write an OS.

You can find the reason for my preference in my other posting.
Besides, many operating systems have already been written in C++.

The question was for quality not quantity. It might well be that there is
the perfect language out there for OS development only nobody ever tried it
out yet.

Besides, where is the fun in doing what everybody else does?

With Regards

Martin
 
J

Jean-Pierre Rosen

EventHelix.com said:
At this point C++ would seem to be the best choice. I don't think any other
language would match C++ in performance and power.
You are certainly free to argue that C++ is a *good* choice, but when you say it is the *best* choice, could you tell over which
languages?

For example, do you know Ada well enough to explain why C++ would be superior?
 
I

Ioannis Vranos

Jean-Pierre Rosen said:
You are certainly free to argue that C++ is a *good* choice, but when you
say it is the *best* choice, could you tell over which
languages?

For example, do you know Ada well enough to explain why C++ would be
superior?


I think that it is happening what the OP intended: A war between
civilizations... There is no better way to start a flame than cross-posting
in different language newsgroups about which is the best language.






Regards,

Ioannis Vranos
 
P

Philippe Ribet

EventHelix.com said:
At this point C++ would seem to be the best choice. I don't think any other
language would match C++ in performance and power.

Do you at least ever heard of Eiffel? I would say that C++ is far from
matching Eiffel power.

What about performance? If only you have made a single benchmark...

Such assessment is just a flame war start.

Nice day to everybody,

--
Philippe Ribet



The README file said
"Requires Windows 95, NT 4.0, or better."
So... I installed it on Linux!
 
J

Jean-Pierre Rosen

Ioannis Vranos said:
I think that it is happening what the OP intended: A war between
civilizations... There is no better way to start a flame than cross-posting
in different language newsgroups about which is the best language.
Not necessarily wars. Technical discussions are interesting, provided people have a wide enough view.
Note that I didn't say "Ada is superior", I said "please explain why you think that C++ is superior".

And if we refrain from religious argument, a technical discussion about what makes a language appropriate for writing an OS (or
anything else) could be quite interesting.
 
M

Martin Krischik

Ioannis said:
I think that it is happening what the OP intended: A war between
civilizations...
There is no better way to start a flame than
cross-posting in different language newsgroups about which is the best
language.

No, KingIshu first question was Ok. He asked for advantages and
disadvantages in respect to OS development. And we are the people to answer
that question. And to discuss the answers.

It would have been better not to ask the 2nd question.

The real problem are answers like the one from EventHelix. He did not state
any specific advantages of C++ just stating C++ is best. This shows great
inexperience in the use of the usenet.

Experienced usenet users will only state the advandages and disadvantages
of there favorite languages and refrain from comenting on other languages.
And saying that one language is best is - indirectly - comenting on other
languages.

With Regards

Martin
 
C

Christopher Benson-Manica

(comp.lang.c++ removed from follup-to)
I think that it is happening what the OP intended: A war between
civilizations... There is no better way to start a flame than cross-posting
in different language newsgroups about which is the best language.

Indeed, which is why a) the crossposting to comp.lang.c++ should stop
immediately, if nothing else, and b) I am plonking this thread as of
now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top