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

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
33 replies · 5K views
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
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.
 
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.
 
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.