Learning C question

G

gustave

I would like to be able to get a bit more involved in the coding of Linux.
I have not dabbled in programming other than Perl and Bash. So some
questions for the experts:

Is Linux (kernel and such) promarily coded in C or C++
From what I understand, it is primarily C.

If this is the case, should I just try to learn some C coding, or start with
C++ as I will understand C anyway?

A bit of advice would be appreciated.

Thank you.

Gus
 
S

Steve Zimmerman

gustave said:
I would like to be able to get a bit more involved in the coding of Linux.
I have not dabbled in programming other than Perl and Bash. So some
questions for the experts:

Is Linux (kernel and such) promarily coded in C or C++
From what I understand, it is primarily C.

If this is the case, should I just try to learn some C coding, or start with
C++ as I will understand C anyway?

A bit of advice would be appreciated.

Thank you.

Gus

Thank you for your post, Gus.


The vast majority of Linux is coded in C; a small fraction of it is
coded in assembly language.

C++ is complex. Two other languages are in use just to try to
simplify C++. Those languages are the Unified Modeling Language
and the Interface Definition Language.

My advice: learn C, and give yourself plenty of time to do it;
avoid C++. Get the Linux source code and study it.

Please email me privately if you would like help in downloading
the Linux source code.

--Steve
 
M

Mike Wahler

gustave said:
I would like to be able to get a bit more involved in the coding of Linux.
I have not dabbled in programming other than Perl and Bash. So some
questions for the experts:

Is Linux (kernel and such) promarily coded in C or C++

Find out by asking on a Linux group, or by googling
for Linux information.
From what I understand, it is primarily C.

If this is the case, should I just try to learn some C coding, or start with
C++ as I will understand C anyway?

Learning C++ will *not* mean you've learned C.
Despite their syntactical similarities, they're
two completely distinct languages, each with
their own rules and semantics.
A bit of advice would be appreciated.

Try a Linux group to find out what you need to learn
to do what you want.

-Mike
 
D

Dan Pop

In said:
I would like to be able to get a bit more involved in the coding of Linux.
I have not dabbled in programming other than Perl and Bash. So some
questions for the experts:

Is Linux (kernel and such) promarily coded in C or C++
From what I understand, it is primarily C.

It is primarily coded in GNU C. GNU C is neither C nor C++.
If this is the case, should I just try to learn some C coding, or start with
C++ as I will understand C anyway?

C and C++ are two different languages. Learning C++ will provide some
insight into C, but not a working knowledge (there are subtle
incompatibilities between the two languages).

If you need C, there is no alternative to learning C.

Dan
 
J

John Bode

gustave said:
I would like to be able to get a bit more involved in the coding of Linux.
I have not dabbled in programming other than Perl and Bash. So some
questions for the experts:

Is Linux (kernel and such) promarily coded in C or C++
From what I understand, it is primarily C.

Mostly C with some GNU extensions and some assembler.
If this is the case, should I just try to learn some C coding, or start with
C++ as I will understand C anyway?

Learning C++ will not necessarily teach you C; although they are
similar in many ways, they are two distinct languages with their own
rules. Learning one will *not* make you proficient with the other.
For example, a statement as simple as

void f();

means different things in each language.

Which you focus on depends on what you want to do. If you want to do
a lot of GUI-oriented programming, C++ would probably be the way to
go, since many of the popular GUI toolkits (Qt, KDE, etc.) are written
in C++.

Of the two languages, C is probably the easier to learn (fewer
keywords, fewer features).
 

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

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top