All of lore.kernel.org
 help / color / mirror / Atom feed
From: bernd@petrovitsch.priv.at (Bernd Petrovitsch)
To: kernelnewbies@lists.kernelnewbies.org
Subject: why only C?
Date: Sun, 03 Apr 2011 21:49:47 +0200	[thread overview]
Message-ID: <1301860187.25574.8.camel@thorin> (raw)
In-Reply-To: <BANLkTikEmyURpOLS7DEvxsT6HEOPRg-ucg@mail.gmail.com>

Hi!

On Mon, 2011-04-04 at 00:47 +0530, mohit verma wrote: [....] 
> As far as i can decipher , we impose Object oriented paradigm in
> kernel space using C  : like using gates to allow only one way entry
> and binding functions to structures in a OOP fashion  and trying to
> make them private to that structure only  , encapsulation of one
> struct into another structure (and lots of features ) and itself  lots
> of kernel subsystem supports like driver interface and blah blah
> behaving like **objects** .......

OOP is a design issue independent of the used programming language. So
you actually *can* do OOP with C (or assembler or ....) and I have seen
C++ programs which do not employ the ideas behind OOP.

> why dont we use some fully OOPs supportive language like JAVA or
> partial supportive language like  C++ to construct Linux Kernel????

What does it buy and what does it cost?

For - or more against - Java: You really do not want an OS to use an
interpreted "language". That kills performance. And the more interesting
challenge is to implement hardware IRQ handlers in Java.

C++ has lots of features which make it awkward to use. For starters,
think about the fact that Java does not have multiple inheritance.

> I don't  think that performance is the main reason behind all this .
> Is it??

Did you google for it and read the links etc.?
You will find much more on this question.

Bernd
-- 
Bernd Petrovitsch                  Email : bernd at petrovitsch.priv.at
                     LUGA : http://www.luga.at

  parent reply	other threads:[~2011-04-03 19:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-03 19:17 why only C? mohit verma
2011-04-03 19:23 ` Anuz Pratap Singh Tomar
2011-04-03 19:25 ` Daniel Baluta
2011-04-03 19:49 ` Bernd Petrovitsch [this message]
2011-04-04  0:30   ` Chaitannya Mahatme
2011-04-04  9:58     ` Bernd Petrovitsch
2011-04-04  9:04   ` mohit verma
2011-04-06 17:37 ` StephanT
2011-04-06 19:30   ` mohit verma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1301860187.25574.8.camel@thorin \
    --to=bernd@petrovitsch.priv.at \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.