LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 02-20-2004, 11:00 AM   #16
PSIplus
Member
 
Registered: Feb 2004
Location: Vienna/Austria
Distribution: Debian Unstable
Posts: 36

Rep: Reputation: 15

Quote:
Originally posted by chewysplace
the code only sucks as bad as teh coder can program. language realy doesnt matter.
ACK!!! The best you can say about it :-)
 
Old 02-20-2004, 11:11 AM   #17
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Quote:
Originally posted by moeminhtun
You know why Linux kernel is written in C?
Because that time "Linus" was still a kid (20 something) and he didn't know how to program in C++ yet.
I really do not think so! (or were you joking?)

Quote from a recent post from Linus to the kernel developers mailing list:
Quote:
In fact, in Linux we did try C++ once already, back in 1992.

It sucks. Trust me - writing kernel code in C++ is a BLOODY STUPID IDEA.

Last edited by Hko; 02-20-2004 at 12:02 PM.
 
Old 02-20-2004, 12:27 PM   #18
chewysplace
Member
 
Registered: Sep 2003
Distribution: Slackware 10 w/ Kernel 2.6.8
Posts: 176

Rep: Reputation: 30
Quote:
Originally posted by PSIplus
ACK!!! The best you can say about it :-)
well tell me where i'm wrong...
 
Old 02-20-2004, 07:42 PM   #19
Tesl
Member
 
Registered: Jun 2003
Location: Durham, UK
Distribution: Slackware 9, Mandrake 9.1
Posts: 163

Rep: Reputation: 30
I love OOP in all honesty, and thats the only reason i rarely use C. Im just too happy using Java/C++, and writing my own bits and pieces

I never saw the point of OOP when i first started out, but id really struggle without it now, since i find it so much easier to use. I think i fell in love with it moreso when using Java, since its OO approach makes the language extremely easy to use.

I think a great deal comes down to personal preference. Chances are not great that il be writing kernel code anytime soon, thus i use either Java or C++ for essentially everything i write.
 
Old 02-21-2004, 12:19 AM   #20
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
Yeah right.
People thought that OOP is difficult and comfusing when they start learning.
Actually it's not difficult. It's just that its learning curve is very steep. It takes so much time to understand. After you understand, it takes so much time to be able to design properly. After you master it, you will realize that OOP is so much easier to write and design than any other procedure languages. So much easier to write, so much easier to modify and maintain. And it also 50% or more faster to write than the procedure languages to produce the same result. At this stage, you will never wanna go back to procedure languages when you write the application level programs.

So please don't confuse with "steep learning curve" and "being difficult".

Last edited by moeminhtun; 02-21-2004 at 12:22 AM.
 
Old 02-21-2004, 12:23 AM   #21
chewysplace
Member
 
Registered: Sep 2003
Distribution: Slackware 10 w/ Kernel 2.6.8
Posts: 176

Rep: Reputation: 30
i learned OOP C++ before i ever knew what C was so it not so hard for me
that and thats all they teach at my university is OOP.
 
Old 02-21-2004, 12:33 AM   #22
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30


<edited>

Last edited by moeminhtun; 02-21-2004 at 12:36 AM.
 
Old 02-21-2004, 08:39 AM   #23
sNicker
Member
 
Registered: Oct 2003
Location: Italy
Distribution: Slackware 9.1, Slackware 10
Posts: 33

Rep: Reputation: 15
Quote:
Originally posted by PSIplus
You cann't compare Linux with Symbian, it's totally different. [/B]
The same with C and C++... I mean pure C and pure C++, no C++ mixed with C-style programming, that's quite ugly...
 
Old 02-21-2004, 10:31 AM   #24
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
C and C++ are both designed for different problems c++ is designed for high level programs that run on top of the os but c is for low level programmes thats why some call c portable assembly. writing a kernel and a high level programme has diffrent priorities like linus said on that mailing list article Hko posted
linus said:
any compiler or language that likes to hide things like memory
allocations behind your back just isn't a good choice for a kernel.

this action is what you will want on a very large scale application and what you wont want on a kernel....
hope you got the idea....
 
Old 02-22-2004, 08:09 AM   #25
gr33ndata
Member
 
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Original Poster
Rep: Reputation: 15
Actually
There is no such strict boundry between low level and high level applications.
You may consider device drivers as low level applications and gui funky stuff as high level application. But what about applications like sniffers and IDSs for example. I think they lie in between.
IMHO ... I think it is all about the desired design ... will it be object oriented or structural programming.
Am I right ?
 
Old 02-22-2004, 08:25 AM   #26
krajzega
Member
 
Registered: Jan 2004
Location: Poland
Distribution: FreeBSD 5.1
Posts: 92

Rep: Reputation: 15
OFC there are a lot of differences between C and C++ but it's clear that the most important is OOB. In my opinion, classes and all methods of OOP are more necessary for bigger applications and projects. It can realy help you and make your application faster, your sorce more clean and able to easy develope.
 
  


Reply



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
ALAC & Lame Script Soulful93 Programming 6 04-15-2009 07:24 PM
Japanese canna won't work : Warning: &#12363;&#12394;&#28450;&#23383;&#22793;&am OrganicOrange84 Debian 3 06-30-2005 02:28 PM
Ph&#7909;c h&#7891;i d&#7919; li&#7879;u b&#7883; m&#7845;t???, c&#7913; pollsite General 1 06-27-2005 12:39 PM
Abit µGuru & hardware monitoring progs for AN7 mobo Alien42 Linux - Hardware 2 04-26-2004 05:02 PM
Welcome new guru! MasterC General 17 05-20-2003 12:50 PM

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

All times are GMT -5. The time now is 12:47 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