Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Any reason to use C?

Author: Robert Hyatt

Date: 10:17:51 07/30/03

Go up one level in this thread


On July 30, 2003 at 06:52:28, Omid David Tabibi wrote:

>On July 30, 2003 at 00:00:54, Robert Hyatt wrote:
>
>>On July 29, 2003 at 22:10:11, Matthew White wrote:
>>
>>>On July 29, 2003 at 22:08:13, Robert Hyatt wrote:
>>>
>>>>On July 29, 2003 at 20:16:59, Matthew White wrote:
>>>>
>>>>>On July 29, 2003 at 16:53:05, Vincent Diepeveen wrote:
>>>>>
>>>>>>On July 29, 2003 at 03:15:54, Hristo wrote:
>>>>>>
>>>>>>>On July 28, 2003 at 19:12:56, Vincent Diepeveen wrote:
>>>>>>>
>>>>>>>>On July 28, 2003 at 17:34:46, Russell Reagan wrote:
>>>>>>>>
>>>>>>>>>Is there any reason to start new projects with C anymore? It seems like most (if
>>>>>>>>>not all) of the drawbacks of C++ have faded away with modern compilers.
>>>>>>>>>
>>>>>>>>>Note that I am talking about new projects, and maintaining old projects is
>>>>>>>>>obviously a good reason to still use C.
>>>>>>>>
>>>>>>>>If i would learn coding today i would prefer C++.
>>>>>>>>
>>>>>>>>However let's be clear, for good programmers there is not much diff between C
>>>>>>>>and C++. Every complex problem which you can solve in 10000 lines of C++ you can
>>>>>>>>solve in 10000 lines C too.
>>>>>>>>
>>>>>>>
>>>>>>>Vincent,
>>>>>>>with all due respect I must disagree. In 10K lines of C++ code one can solve a
>>>>>>>much more general or larger set of problem(s) or cram in more features. :)
>>>>>>>(think templates, exceptions, and often inheritance ... all of which can shorten
>>>>>>>your code)
>>>>>>
>>>>>>I do not know about you, but i program both in C and C++.
>>>>>>
>>>>>>Do you?
>>>>>>
>>>>>>Not a single program where you can use all the nice toys you can also make a few
>>>>>>functions for in C.
>>>>>>
>>>>>>In general the average programmed C++ program you program more compact in C.
>>>>>>
>>>>>>That's not what i'm talking about.
>>>>>>
>>>>>>If you do not know how to program in C, then just say it loud instead of writing
>>>>>>it down like this.
>>>>>>
>>>>>>the advantages of what you mention here (assuming 1 man products) you can show
>>>>>>great in 50 line examples or even 200 line examples.
>>>>>>
>>>>>>But as soon as you write a 10000 line product then it doesn't matter what you do
>>>>>>in C++. I can do the same in C too. No problem!
>>>>>>
>>>>>>>In your post, latter, you indicate that C++ offers some advantages over C,
>>>>>>>especially for large projects. In my experience this is %100 true, so we are in
>>>>>>
>>>>>>I see no other advantages to C++ than for big projects in fact.
>>>>>>
>>>>>>The advantage is *really* huge there for companies.
>>>>>>
>>>>>>Given the importance of those companies for the world, the choice to teach
>>>>>>students C++ instead of C is a logical choice.
>>>>>>
>>>>>>teaching them Java, delphi i find a bad idea.
>>>>>>
>>>>>The best reason that I see to teach students using Java is that Java gives you
>>>>>useful information when an error occurs (remember the first time you saw a
>>>>>segmentation fault how lost you felt?). Java has strong typing and it FORCES
>>>>>object orientedness. C and C++ are too frustrating for new programmers...
>>>>>
>>>>>Matt
>>>>
>>>>
>>>>Strong typing was also Pascal's claim to fame.  Thankfully it died a
>>>>graceful death.
>>>
>>>It was good for teaching, though...
>>>
>>>Matt
>>
>>
>>Depends on your ultimate goal.  If you are going to be a programmer, it is
>>not the best way to go.  If you program in Java for 4 years, then leave and
>>go to work where they use C, you have a _long_ learning curve.  You've never
>>seen pointers, for example.
>
>I completely agree with this.
>
>During the past few years many US universities have switched to Java as the main
>programming language. Do they comprise the majority now?

It is getting close...


>
>There is also a strong trend of moving towards Java in European universities,
>but I don't know whether that's what the majority of universities do.
>
>In Israel, fortunately, C++ is still the main programming language, but there is
>an increasing pressure to replace it with Java. I'm personally advocating even
>more C in the C++, but I have the minority opinion...
>



Java has its plusses.  Many will use it in web-based applications, so there
is a market for it.  But not in large IT applications.




>>
>>We took a _lot_ of heat about that from companies like BellSouth.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.