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-29-2004, 12:27 PM   #31
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Original Poster
Rep: Reputation: 31

Quote:
Originally posted by Stack
You named your thread why use C/C++ so that is a valid response like it or not.
Yes, and we already touched on the "the specs require it", which would be the result of a job requiring it. This is a discussion about why YOU as a program designer would choose to use C or C++ over any other language (not just Python) for any given project. Let's keep it focused on that and let's keep accusations out of it.
 
Old 02-29-2004, 04:10 PM   #32
shortfuse
Member
 
Registered: Feb 2004
Location: Texas
Distribution: Debian
Posts: 30

Rep: Reputation: 15
Well as far as why use C it's simple for me, it's portable. No other language can match the C's portablility, that's why it is the defacto standard language for compilers/interpreters. Without C we wouldn't have Perl, Python, Java, or VB just to name a few.

C++ is just an extension of C that allows for much better abstraction which in turn allows for very large projects to remain managable.

Just my 2 cents.
 
Old 02-29-2004, 05:46 PM   #33
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by shortfuse
Well as far as why use C it's simple for me, it's portable. No other language can match the C's portablility, that's why it is the defacto standard language for compilers/interpreters. Without C we wouldn't have Perl, Python, Java, or VB just to name a few.

C++ is just an extension of C that allows for much better abstraction which in turn allows for very large projects to remain managable.

Just my 2 cents.
That's pretty ridiculous, considering that 3 of the 4 languages you mentioned are more portable than C, generally speaking. And althought it's a bit of a joke adage, there's something worth pondering in: "C combines the
power of assembly language with the portability of assembly language."
 
Old 02-29-2004, 05:54 PM   #34
shortfuse
Member
 
Registered: Feb 2004
Location: Texas
Distribution: Debian
Posts: 30

Rep: Reputation: 15
Quote:
Originally posted by Strike
That's pretty ridiculous, considering that 3 of the 4 languages you mentioned are more portable than C
Pretty ridiculous?!

All their respective compilers/interpreters are written in C!

That was my point.

Last edited by shortfuse; 02-29-2004 at 05:56 PM.
 
Old 02-29-2004, 06:10 PM   #35
cjcuk
Member
 
Registered: Dec 2003
Distribution: Openwall, ~LFS
Posts: 128

Rep: Reputation: 15
Quote:
Originally posted by Strike
That's pretty ridiculous, considering that 3 of the 4 languages you mentioned are more portable than C, generally speaking. And althought it's a bit of a joke adage, there's something worth pondering in: "C combines the
power of assembly language with the portability of assembly language."
Not to be offensive, but you really seem on the war path against C. Do you know how many operating systems implement things like POSIX? C is a lot more portable than you are making it out to be. Now, I am not claiming it is some ultra-portable language like the interpreted languages can be ( if well written, in much the same way as you have to pay attention to what standards you are writing your C code to ), I just cannot understand how you cannot see that. I think that the way this thread is going is becoming futile -- somebody states a view about C ( often at least slightly-biased by opinion ) you dispute it, again based, in part at least, on opinion. This is not meant to be an ad hominem attack, I just feel that this thread needs to be more objective -- though it is hard for it to become that when it's initial premise seems to be an assault against C ( and C++ ). I hope this post is not misconstrued, but I felt it needed to be said.

As a side note, I think you probably realise that the quote does not get across the point the author of the post was trying to make. I believe he most likely meant something like, ``C combines the power of assembly language with the portability lacking from assembly language''.
 
Old 02-29-2004, 07:40 PM   #36
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by shortfuse
Pretty ridiculous?!

All their respective compilers/interpreters are written in C!

That was my point.
Yes, and they are all special-cased for each platform they run on! And the executables most certainly wouldn't run on systems other than the ones they were compiled for initially.
 
Old 02-29-2004, 07:51 PM   #37
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by cjcuk
Not to be offensive, but you really seem on the war path against C.
Warpath? I'm not getting angry or anything ...

Quote:
Do you know how many operating systems implement things like POSIX? C is a lot more portable than you are making it out to be.
Yeah, it's somewhat portable, but other languages are a lot MORE portable. The jab at it being as portable as assembly was a bit of a joke.

Quote:
I think that the way this thread is going is becoming futile -- somebody states a view about C ( often at least slightly-biased by opinion ) you dispute it, again based, in part at least, on opinion.
Well, that was kind of the point of this thread. I'm trying to find what bad reasons people justify using C/C++ for so I can tell them why they are bad Some of them have been good, though, and I've conceded to them.

Quote:
This is not meant to be an ad hominem attack, I just feel that this thread needs to be more objective -- though it is hard for it to become that when it's initial premise seems to be an assault against C ( and C++ ). I hope this post is not misconstrued, but I felt it needed to be said.
I don't feel I'm being unnecessarily subjective, but feel free to show me where I have been. I have had to narrow the scope a bit to clarify my original point (because I do realize there are a few arenas where C/C++ are just about the only choice), but other than that I'm not sure where my opinion has factored in.
 
Old 02-29-2004, 08:03 PM   #38
shortfuse
Member
 
Registered: Feb 2004
Location: Texas
Distribution: Debian
Posts: 30

Rep: Reputation: 15
Strike,

The point I'm trying to make is those languages wouldn't exist without C. That "special cased" code your referring to ENABLES you to execute your code. Only a madman would try to port a compiler written in assembly...what other choice does a developer have?
 
Old 02-29-2004, 08:10 PM   #39
xarius
LQ Newbie
 
Registered: Feb 2004
Distribution: Linux From Scratch
Posts: 10

Rep: Reputation: 0
I am going to answer this, regardless of how trollish the initial post was.

Basically, programs written (and written well) in C/C++ are fast. That is the prime reason for anyone using C++. Even in this day and age with fast machines, speed is of the essence. a few seconds of performance loss might not seem important, but then how many programs/daemons/scripts etc. do you run on your machine in a day?

Let's say 50 (for the sake of the argument). If all these programs were written in Java, and perform at about 3/4's the speed of C++, how much time have you lost just waiting for things to happen.

Also the "memory management" argument is ludicrous, I hardly ever have to bother with managing memory, if I don't want to.

Yeah, umm. C++ is amazing. It's been around for a long time, has a standards committee etc. Just use it like everyone else instead of trying to be controversial and non-conformist ok?

(Right tool, Right job etc. of course...)
 
Old 02-29-2004, 08:17 PM   #40
chewysplace
Member
 
Registered: Sep 2003
Distribution: Slackware 10 w/ Kernel 2.6.8
Posts: 176

Rep: Reputation: 30
Quote:
Originally posted by krajzega
1. 95 precent of UNIX is written in C/C++
2. Most *NIX apps are written in C/C++
3. C and C++ can learn you many aspects of programming but also lots of computer issues, for example alocating memory, working on streams, tcp/ip ..and it can make you understand it not only in programming case (for example: I couldn't have understand tcp/ip without programming sockets..it was too difficult).
4. Its the best language
5. However it can be right question on windows or dos programming forums, here is just stupid
i'd have to agree with this for the most part. though since i'm taking a Concepts of Programming Languages course i'm beggining to see why c/c++ isnt all that great. but it is the best for now.

from what i can tell about this whole "discussion" though is someone wanting to pick a fight and say he's right. *cough* strike *cough* but aside from his comments everyone has put up some legitimate arguments.
 
Old 02-29-2004, 09:32 PM   #41
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by xarius
I am going to answer this, regardless of how trollish the initial post was.
How trollish was it? It wasn't trollish at all. It was an honest question intending to elicit honest answers from people.

Quote:
Basically, programs written (and written well) in C/C++ are fast. That is the prime reason for anyone using C++.
You can't speak for everybody, and nor can I. That's why I am asking for people's reasons in choosing C/C++ when they decide to create a program. When speed is of paramount importance, I fully understand (and generally agree with) the choice of C/C++ as the implementation language.

Quote:
Even in this day and age with fast machines, speed is of the essence. a few seconds of performance loss might not seem important, but then how many programs/daemons/scripts etc. do you run on your machine in a day?

Let's say 50 (for the sake of the argument). If all these programs were written in Java, and perform at about 3/4's the speed of C++, how much time have you lost just waiting for things to happen.
First of all, a few seconds is always important, but other implementations would introduce delays of maybe milliseconds. And also, as I've said a few times now, I'm not talking about daemons or anything else, so 50 is a ludicrous number to use as an example. Most people are hardly ever using more than a dozen interactive apps at once, and they certainly aren't actively using more than a handful of those apps at once.

Quote:
Also the "memory management" argument is ludicrous, I hardly ever have to bother with managing memory, if I don't want to.
Then (assuming we're talking about C/C++) either (a) you aren't making secure programs, (b) you aren't making any programs, (c) you're using some sort of compiler patch, or (d) you are bothering with it

Quote:
Just use it like everyone else instead of trying to be controversial and non-conformist ok?
I hope this is a joke, but there's no smiley or anything like that to indicate that it is. But I seriously hope that it is.
 
Old 02-29-2004, 09:36 PM   #42
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by chewysplace
from what i can tell about this whole "discussion" though is someone wanting to pick a fight and say he's right. *cough* strike *cough* but aside from his comments everyone has put up some legitimate arguments.
No, it's me being very bewildered at why people in general make what seem to me to be asinine choices in their choice of programming language for projects where speed isn't a factor and a higher-level language would not only make their program easier to write, but more portable and easier to maintain and improve upon. There's no fight going on, so how can you say I've picked a fight? And where have I declared myself "right"?

I am getting very tired of being accused of things in this thread. If you have an issue with me or this thread, take it up with me or the forum moderators outside of the thread and try not to draw attention away from legitimate discussion in the thread.
 
Old 02-29-2004, 10:18 PM   #43
xarius
LQ Newbie
 
Registered: Feb 2004
Distribution: Linux From Scratch
Posts: 10

Rep: Reputation: 0
Hey, if you don't like C/C++ don't use it. And if you don't like people questioning *your* choices, then don't talk about them in a public forum.
 
Old 02-29-2004, 10:47 PM   #44
chewysplace
Member
 
Registered: Sep 2003
Distribution: Slackware 10 w/ Kernel 2.6.8
Posts: 176

Rep: Reputation: 30
LOL
 
Old 02-29-2004, 11:01 PM   #45
eshwar_ind
Member
 
Registered: Feb 2004
Location: Bangalore
Distribution: Redhat
Posts: 144

Rep: Reputation: 15
I Love C
I Like C++
I Love Linux
I Dont Like Java
thats the reason
 
  


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
DISCUSSION: How To Do Eveything With DD AwesomeMachine LinuxAnswers Discussion 23 03-09-2017 06:50 AM
Discussion LinuxRam General 5 08-24-2004 06:58 AM
A Discussion On Certification LinuxRam Linux - Certification 2 07-31-2004 11:49 PM
webmail discussion illtbagu Linux - Software 2 11-11-2003 11:03 PM
Serious Discussion nbjayme Linux - Newbie 2 09-24-2003 10:49 AM

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

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