What computer science class should I take for my math degree? C or C++?

Click For Summary

Discussion Overview

The discussion revolves around the choice of a computer science class for a math degree, specifically whether to take an introductory course in C or C++. Participants explore the implications of each choice, considering factors such as programming complexity, applicability, and the nature of the courses offered.

Discussion Character

  • Debate/contested
  • Exploratory
  • Technical explanation

Main Points Raised

  • Some participants suggest that C is simpler and more suitable for beginners, emphasizing the ease of understanding pointers for someone with a math background.
  • Others argue that C++ might be a better starting point due to its higher-level features and readability, although this is contested.
  • A few participants propose taking both C and C++ sequentially to gain a broader understanding, while others question the necessity of two introductory courses.
  • There is a suggestion that if MATLAB or Fortran classes are available, they might be more beneficial than either C or C++ for fulfilling degree requirements.
  • Some participants express skepticism about the value of introductory programming courses, arguing that they do not provide a true understanding of computer science concepts.
  • Several participants highlight that the specific syllabus of the courses could significantly influence the decision, indicating that course content is more important than the programming language itself.
  • There is disagreement about the complexity of C++ compared to C, with some asserting that C++ is too large for an introductory course, while others believe that the size of the language is irrelevant for beginners.

Areas of Agreement / Disagreement

Participants do not reach a consensus on whether C or C++ is the better choice for an introductory programming course. Multiple competing views remain regarding the complexity, applicability, and value of each language in the context of fulfilling a math degree requirement.

Contextual Notes

Participants express uncertainty about the actual content of the courses, indicating that the effectiveness of either language as a teaching tool may depend heavily on the specific topics covered in the syllabus.

  • #31
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 still meets the definition of a high level language, does it not? Or am I just totally lost here.
 
Physics news on Phys.org
  • #32
The whole notion of high level and low level languages are relative.

Its a matter of opinion but and I hate quoting a wiki page but even the wiki page on "high level language" has

"The terms high-level and low-level are inherently relative. Some decades ago, the C language, and similar languages, were most often considered "high-level", as it supported concepts such as expression evaluation, parameterised recursive functions, and data types and structures, while assembly language was considered "low-level". Today, many programmers might refer to C as low-level, as it lacks a large runtime-system (no garbage collection, etc.), basically supports only scalar operations, and provides direct memory addressing. It, therefore, readily blends with assembly language and the machine level of CPUs and microcontrollers."

which has stood unedited despite the high visibility of a page for such a simple term which would make it susceptible to correction if it was a controversial statement.

High level language is a term not a mathematical theorem which means its only defined by humans and their majority opinion of the term.
 
  • #33
I agree with Student100; the level is calculated by it's level of abstraction and in that sense, C and C++ are not low level. Fully relative comparison lacks in accuracy.
 
  • #34
Crager,

The underlying implication here is what you want to do with the course, and if that's take it, ace it, and forget it, it doesn't really matter.

At the level of learning basic high level programming syntax the choice between C and C++ is superficial. You probably won't be exposed to the situations that emphasize the advantages of using one over the other. For simple, procedural programming, the syntax is mostly the same, barring some compiler overhead you won't get into until data structures anyway.

As someone who completed an Applied Mathematics degree and now works as a Software Engineer I advise choosing the class that gives the broadest focus in the subject. Choose the class that, while emphasizing procedural programming, exposes the student to binary math, basic data structures, basic memory management, and introductory search/sort algorithms. You won't learn the conceptual knowledge you need for awareness or debugging if the C++ class emphasizes Object-O over the aforementioned subjects. If the choice is purely between compiler extension (C or C++), I'd choose C. Less bloated code == greater awareness.

And for anyone who wants to learn more about programming and the extent of their technical knowledge ends with Ctrl-Alt-Del I'd recommend looking into the aforementioned content, and focus on a strongly-typed, compiled language like C first, move into a Object-O scripting language like Python next, spend some time on Data structures, and then consult texts on assembly or systems specific (API's for Linux/Unix/GNU, Cocoa, or Android) after getting your feet wet first.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 32 ·
2
Replies
32
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 21 ·
Replies
21
Views
4K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 4 ·
Replies
4
Views
930