- #1
cragar
- 2,552
- 3
I need a computer science class for my math degree.
Should I take intro to C or intro to C++ . I know nothing about programming.
Should I take intro to C or intro to C++ . I know nothing about programming.
cragar said:I think we have a math class that uses matlab. should I take intro to c first then c++.
ChaseDuncan said:I question the advice of taking two 'intro' CS courses. The fundamentals for both should be about the same thing. If you're planning to go on to do programming in your life then either one are just a stepping stone and C and C++ should be fairly interchangeable for you at the level that you will be working in the near future. If you're not planning to go on to do more programming then taking to intro CS classes is a waste of time for even more obvious reasons.
I think C++ is better language to begin with, personally. Perhaps that's a matter of taste?
It's hard to recommend a class without seeing a syllabus. Also, all you've said is that you're fulfilling credit. If that's the case, then the choice is fairly inconsequential. In my experience people have an easier time with C++ than C.
Exactly. I would not recommend C++ as an introductory language. It's just too big. Python is just about perfect for a beginner language, but that apparently isn't an option.Student100 said:Why would people have an easier time with C++ then C? That makes no sense.
Student100 said:Why would people have an easier time with C++ then C? That makes no sense.
The fundamentals for each will be completely different, C will give you the syntax and introduce you to programming languages, an intro to C++ class should focus on classes and OOP.
D H said:Exactly. I would not recommend C++ as an introductory language. It's just too big. Python is just about perfect for a beginner language, but that apparently isn't an option.
ChaseDuncan said:Because C++ is higher level which makes the code more readable and less cryptic.
I think the important thing to keep in mind here is that we're talking about 'intro' courses not mastery. On an introductory level, OOP is just easier for people to interface with.
ChaseDuncan said:I agree with you about Python or even Java but as you said, that's not an option. I'm not really sure about your 'big' statement, however. C is pretty darn big too for someone with no programming experience. I doubt the range of either them will be covered in a significant way in an intro class, thus I can't see how it matters much.
That being said, I'd like to see syllabi. I have strong doubts about classes that are about languages. I'm of the mind that a CS class should be about topics in CS. The language is sort of incidental.
Student100 said:His "big" statement is perfectly accurate, even standardization committees take jabs at how large C++ is. C is tiny.
I'm seriously doubting you know what you're talking about at this point.
Student100 said:Errr, I would disagree with everything you wrote.
ChaseDuncan said:You've missed the point. The bigness of C++ relative to C is irrelevant in an introductory course. It's not as if you will explore the entire language -- or anything close to it. Of course, that irrelevance sort of runs both ways. Thus I don't think it matters much if this person takes an intro to C course or an intro to C++. What will matter is the topics that are covered in the course. The language is incidental, as I said. That's also the reason it's entirely pointless to take two intro courses.
Student100 said:Errr, I would disagree with everything you wrote.
I agree. An introductory CS class should teach how to program (in general) instead of teaching the ins and outs of one specific language. A language is needed to teach how to program, but teaching the language should be a secondary concern.ChaseDuncan said:That being said, I'd like to see syllabi. I have strong doubts about classes that are about languages. I'm of the mind that a CS class should be about topics in CS. The language is sort of incidental.
D H said:I agree. An introductory CS class should teach how to program (in general) instead of teaching the ins and outs of one specific language. A language is needed to teach how to program, but teaching the language should be a secondary concern.
Since one of the core concepts of computer science is object oriented programming, this should be a part of the very first CS class. In my opinion, of course. Teaching OO techniques with a non-OO language such as C is beyond the scope of a introductory class.
A good introductory language is one that
- Is easy to use and easy learn.
- Offers a number of different programming paradigms.
- Contains a number of computer science data types, built in.
- Provides well-established defensive programming mechanisms, many dating back to the early 1960s.
- Doesn't carry a lot of arcane baggage.
C fails massively on items 2 and 3. C++ fails somewhat on item 1. Python fails massively on item 4. All have significant shortcomings with item #5. It's not so much a matter of which is better but which is worse.
Because C++ is higher level which makes the code more readable and less cryptic.
I think the important thing to keep in mind here is that we're talking about 'intro' courses not mastery. On an introductory level, OOP is just easier for people to interface with.
jesse73 said:Im pretty sure higher level languages make for more readable code for humans. It is pretty much the point of a higher level language to be more readable for humans.
What would you consider the short coming of someone learning procedural programming to get their feet wet before learning OOP?D H said:I agree. An introductory CS class should teach how to program (in general) instead of teaching the ins and outs of one specific language. A language is needed to teach how to program, but teaching the language should be a secondary concern.
Since one of the core concepts of computer science is object oriented programming, this should be a part of the very first CS class. In my opinion, of course. Teaching OO techniques with a non-OO language such as C is beyond the scope of a introductory class.
A good introductory language is one that
- Is easy to use and easy learn.
- Offers a number of different programming paradigms.
- Contains a number of computer science data types, built in.
- Provides well-established defensive programming mechanisms, many dating back to the early 1960s.
- Doesn't carry a lot of arcane baggage.
C fails massively on items 2 and 3. C++ fails somewhat on item 1. Python fails massively on item 4. All have significant shortcomings with item #5. It's not so much a matter of which is better but which is worse.
Shivam3013 said:Student, C++ and to some extent C are both considered relatively low-level languages.
I disagree. From my own experience working with others who have never been exposed to object oriented techniques, the transition from C to C++ is extremely difficult. Transitioning from python or smalltalk to C++ is going to be much easier than transitioning from C to C++. As a starter, understanding pointers is an essential part of understanding C. Well-written C++ code does *not* use pointers for the most part. Herb Sutter, the chair of the C++ standards committee, claims to have not used raw pointers (i.e., C-style pointers) for years. From what I can tell, he *hates* raw pointers.Shivam3013 said:The transition from C -> C++ wouldn't be too difficult.
cragar said:thanks for the responses, My classes will be intro to c, set theory, and English 101, quite a variety.
D H said:I disagree. From my own experience working with others who have never been exposed to object oriented techniques, the transition from C to C++ is extremely difficult. Transitioning from python or smalltalk to C++ is going to be much easier than transitioning from C to C++. As a starter, understanding pointers is an essential part of understanding C. Well-written C++ code does *not* use pointers for the most part. Herb Sutter, the chair of the C++ standards committee, claims to have not used raw pointers (i.e., C-style pointers) for years. From what I can tell, he *hates* raw pointers.
Readability and whether a language is low level or high level language are not defined by binary functions. It is more of a continuous variable where you can rank things as how readable or low level they are.Student100 said:And when did C become a low level language? C/C++ are both high level languages, it's just that C++ evolved from C by adding some levels of abstraction.
D H said:I disagree. From my own experience working with others who have never been exposed to object oriented techniques, the transition from C to C++ is extremely difficult. Transitioning from python or smalltalk to C++ is going to be much easier than transitioning from C to C++. As a starter, understanding pointers is an essential part of understanding C. Well-written C++ code does *not* use pointers for the most part. Herb Sutter, the chair of the C++ standards committee, claims to have not used raw pointers (i.e., C-style pointers) for years. From what I can tell, he *hates* raw pointers.
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off.
Student100 said:And when did C become a low level language?
AlephZero said:It never became one. it was one, right from day one. It was designed as something "better than assembler code", for writing system software and operating systems. For scientific computing, it isn't even as high level as Fortran IV.
C and C++ are both programming languages that are widely used in computer science and engineering. C is a procedural programming language, meaning it follows a step-by-step approach to solve a problem. C++ is an object-oriented programming language, meaning it focuses on creating objects and classes to solve a problem. C++ also has additional features such as inheritance and polymorphism that are not present in C.
Both C and C++ can be useful for a math degree, as they both have strong mathematical capabilities. However, C++ may be more beneficial in the long run as it has more advanced features and is widely used in scientific and mathematical applications.
Both C and C++ are popular programming languages and are used in a variety of industries, including technology, finance, and gaming. Programmers with knowledge of these languages can find job opportunities in various fields, including software development, data analysis, and research.
This is subjective and depends on the individual's learning style and background. C is a simpler language with fewer features, making it easier to learn the basics. However, C++ has a steeper learning curve due to its more advanced features and concepts. Ultimately, the best language to learn would depend on the individual's goals and interests.
Yes, it is possible to learn both languages simultaneously. However, it may be more beneficial to focus on one language at a time to fully understand its concepts and syntax. Once you have a strong foundation in one language, it will be easier to learn the other as they have many similarities.