Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [C] Why you should learn C
Index -> Programming, C++ -> C++ Tutorials
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Wed Oct 27, 2004 3:03 am   Post subject: [C] Why you should learn C

It's useful

C is as close as you will probably ever come to assembly without actually subjecting yourself to assembly. Sometimes it's necessary or at least beneficial to deal with the computer on this level.

It's everywhere

Few languages are implemented as widely as C. If you're developing a program for a large number of platforms, you can be almost guaranteed that they will have some form of C compiler.

Though many languages are technically superior to C, few can boast the same advantage.

Knowing the difference between C and C++

Someday you may be called on, as a C++ programmer, even if that is what you spend most of your time doing, to write C code. At those times, it's going to be rather difficult not to employ C++ habits. Knowing what is C and what comprises C++ will help you avoid those pitfalls. As well, it'll give you the ability to write better C code when that time comes.

Employers often have a difficult time differentiating the two languages. This is made worse because the people in charge of hiring programmers often have no experience in that field themselves. They likely believe C++ is just an improved C, and they may hire you to write C code, even though they advertise for a C++ programmer. To hold onto the job you had better be able to write C code.

It's the basis for Objective-C

Objective-C doesn't make any changes to the C language, so it's very easy for a C programmer to get into Obj-C programming. This is the language of choice for Mac developers, and GNUStep developers alike. Both are small markets, but ones with a lot of room to grow, and they're more fun and dynamic than most others.
Sponsor
Sponsor
Sponsor
sponsor
JHanson90




PostPosted: Wed Oct 27, 2004 10:33 pm   Post subject: Re: [C] Why you should learn C

wtd wrote:
It's everywhere

Few languages are implemented as widely as C. If you're developing a program for a large number of platforms, you can be almost guaranteed that they will have some form of C compiler.

Though many languages are technically superior to C, few can boast the same advantage.

Not only that, but most of the programming languages themselves that I've seen are written in C, and also OSs. People might as well learn C if it's what like everything is written in...

Also, to learn C is to learn the very foundation of tons of other programming languages. By understanding C code, I can understand just about any programming language. Smile
wtd




PostPosted: Wed Oct 27, 2004 11:08 pm   Post subject: Re: [C] Why you should learn C

JHanson90 wrote:
wtd wrote:
It's everywhere

Few languages are implemented as widely as C. If you're developing a program for a large number of platforms, you can be almost guaranteed that they will have some form of C compiler.

Though many languages are technically superior to C, few can boast the same advantage.

Not only that, but most of the programming languages themselves that I've seen are written in C, and also OSs. People might as well learn C if it's what like everything is written in...


To clarify a bit, OSes are often written in C (though there are a fair number written in C++ nowadays, and Pascal used to be pretty popular for that. There are a few hobbyist OSes written from the ground up in assembly. MenuetOS comes to mind as possibly the most famous.

Programming languages, however, are not "written" in C. Their compilers or interpreters may be, but that deals with the implementation of the language, which should be quite distinct from the language itself. Smile

JHanson90 wrote:
Also, to learn C is to learn the very foundation of tons of other programming languages. By understanding C code, I can understand just about any programming language. Smile


The only problem is that C leaves one with no preparation for object-oriented programming, and instills bad procedural habits.

I wasn't advocating C as a good language, just one that people should know. It is most definitely not a learning language, unless very carefully taught.
JHanson90




PostPosted: Thu Oct 28, 2004 3:57 pm   Post subject: Re: [C] Why you should learn C

wtd wrote:
Programming languages, however, are not "written" in C. Their compilers or interpreters may be, but that deals with the implementation of the language, which should be quite distinct from the language itself. Smile

That's sort of what I meant, just didn't think to word it that way. Of course, you can't actually write a language; English wasn't written in another language, it's the idea of the human mind interpreting it that makes it real. But English came about from earlier languages, and that's what I meant when I was talking about how you would use C to create programming languages.

wtd wrote:
The only problem is that C leaves one with no preparation for object-oriented programming, and instills bad procedural habits.

I wasn't advocating C as a good language, just one that people should know. It is most definitely not a learning language, unless very carefully taught.

C isn't a good language? What's bad about it? I know it doesn't have object-oriented features, but that's just a matter of taking a different computer science course, to me. My rule is that if the language is powerful enough, yet still understandable, and secure, it is OK. But I define "powerful" also as how little code you can write while still getting the same effect, which is why I also like simple languages like Ruby. Assembly is too much code, but C seems to be the medium between Assembly and simplicity.
Tony




PostPosted: Thu Oct 28, 2004 4:02 pm   Post subject: Re: [C] Why you should learn C

JHanson90 wrote:
But I define "powerful" also as how little code you can write while still getting the same effect

When it comes to programming languages, "power" means speed of execution and hardware access.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
JHanson90




PostPosted: Thu Oct 28, 2004 4:16 pm   Post subject: Re: [C] Why you should learn C

tony wrote:
JHanson90 wrote:
But I define "powerful" also as how little code you can write while still getting the same effect

When it comes to programming languages, "power" means speed of execution and hardware access.

I know, that's why I said "I define it as..." and not "it is defined as... ". To me, theoretically, if you made the most powerful program in the world in the most complex language in the world, and then did the exact same program written in a simpler language with one third the lines of code, I would say the simpler language is more powerful. Of course this isn't true, but let's say there were three levels of power, and each character written in the complex language would have a power level of 1, so therefore each character in the simpler language would have a power level of 3. So the simple language is proportionally as powerful as the complex one, but taking more lines of code to reach the same point.

My mind doesn't make sense...
JHanson90




PostPosted: Thu Oct 28, 2004 4:22 pm   Post subject: Re: [C] Why you should learn C

JHanson90 wrote:
tony wrote:
JHanson90 wrote:
But I define "powerful" also as how little code you can write while still getting the same effect

When it comes to programming languages, "power" means speed of execution and hardware access.

I know, that's why I said "I define it as..." and not "it is defined as... ". To me, theoretically, if you made the most powerful program in the world in the most complex language in the world, and then did the exact same program written in a simpler language with one third the lines of code, I would say the simpler language is more powerful. Of course this isn't true, but let's say there were three levels of power, and each character written in the complex language would have a power level of 1, so therefore each character in the simpler language would have a power level of 3. So the simple language is proportionally as powerful as the complex one, but taking more lines of code to reach the same point.

My mind doesn't make sense...
To clarify:

Ruby program
code:
puts "Hello World"

Java program
code:
public class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

Remember the word theoretically; of course I know that Java is more powerful, but assume the Java one is like the 'complex' program from my weird explanation, and assume the Ruby one is the 'simple' program from my weird explanation.
rizzix




PostPosted: Thu Oct 28, 2004 4:26 pm   Post subject: (No subject)

haha in that case perl is the most powerful pfft. to tell u the truth simplicity is not power.. neither is complexity. but how well a language simplifies complex tasks.. that is power.
Sponsor
Sponsor
Sponsor
sponsor
JHanson90




PostPosted: Thu Oct 28, 2004 5:11 pm   Post subject: (No subject)

rizzix wrote:
haha in that case perl is the most powerful pfft. to tell u the truth simplicity is not power.. neither is complexity. but how well a language simplifies complex tasks.. that is power.
That's what I'm trying to say, I just have weird examples... simplifying a complex task is power, I agree. I wasn't trying to say that simplicity is power, I was trying to say that power with simplicity is even more power.
wtd




PostPosted: Thu Oct 28, 2004 5:45 pm   Post subject: (No subject)

Java is not more powerful than Ruby. Smile
JHanson90




PostPosted: Thu Oct 28, 2004 6:15 pm   Post subject: (No subject)

wtd wrote:
Java is not more powerful than Ruby. Smile
Ah, I don't know anything about Java, but whatever. All the better since I'm a Ruby fan. Very Happy
rozy_19




PostPosted: Tue Nov 02, 2004 10:13 am   Post subject: (No subject)

c is useful for develope our programming concept.if we know c/c++ than u can understand any language easily.means can improve your logic.
when java is concered.if u knowing c/c++ than easy too understand n u can learn it easily.
Tony




PostPosted: Tue Nov 02, 2004 2:02 pm   Post subject: (No subject)

rozy_19 wrote:
if we know c/c++ than u can understand any language easily

The post was made about C, not C++, try to not confuse those Razz And such is not unique to any particular programming language. It's easier to learn new languages as you gain practice with others.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
wtd




PostPosted: Tue Nov 02, 2004 2:16 pm   Post subject: (No subject)

tony wrote:
rozy_19 wrote:
if we know c/c++ than u can understand any language easily

The post was made about C, not C++, try to not confuse those


Or you'll earn my wrath. Smile
Andy




PostPosted: Wed Nov 03, 2004 5:09 pm   Post subject: (No subject)

rozy_19 wrote:
c is useful for develope our programming concept.if we know c/c++ than u can understand any language easily.means can improve your logic.
when java is concered.if u knowing c/c++ than easy too understand n u can learn it easily.


for some reason... i get the feeling that u noe neither c nor c++...
Display posts from previous:   
   Index -> Programming, C++ -> C++ Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 15 Posts ]
Jump to:   


Style:  
Search: