开发者

What should I learn first before heading to C++? [closed]

开发者 https://www.devze.com 2023-01-28 16:23 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 4 years ago.

Improve this question

I'm learning C, but after that or in the meanwhile, what should I learn first and subsequently before getting into C++ ? Compilers, Data Structures, UML or Design Patterns ?(also when start to learn Win32 API ?) I'm not in a hurry at all, so I can grasp the requireme开发者_运维问答nts from the deepest beginning. I just don't want to get lost for being cursory and negligent.

In addition to this, which subjects on mathematics has most impact on coding very well ? Linear Algebra, Discrete Mathematics, Calculus ?

I'll be thankful if someone guides me through this journey. There are many questions I would like to know the answers. Thanks.


First you should learn that C++ is not a superior language. C has its uses as more than a stepping stone into C++. C, and "C-style" C++ are used because they:

  • Generate smaller binaries
  • Use less memory
  • Compile faster
  • Do not require OS-support
  • Are simpler, and easier to implement

Data structures are by far the most useful of the listed to learn, followed by algorithms. If you intend to go into C++, it's also useful (mandatory?) to have good design skills.

You should not necessarily learn Win32 at all. Consider learning the POSIX APIs, GTK+ and Boost, as they're more portable, and work on platforms other than Windows.

The best decision you can make is to learn C thoroughly as a separate skill on a Unix platform, before crutching yourself by not being able to see the difference between C and C++.

Of the listed Mathematics disciplines, I've only used discrete mathematics. Linear algebra is also useful, but by far and away the best discipline for programming is set and number theory.

Enjoy your time in C, don't become dependent on Windows/Visual Studio, and don't rush into C++.

Update0

Almost forgot! You absolutely must use a decent C compiler. A central reason to C++'s wide use in enterprise, and the bad reputation C has among Windows developers is Visual Studio. Visual Studio is easily the best C++ IDE, however it's also the worst C compiler I know of. Be sure to use a C compiler with C99 support, such as GCC, mingw or Clang. My first experience with C was using LCC, which was very easy to use on Windows, but I haven't used it since moving to Linux, so I can't comment on its C99 status.


Compilers, Data Structures, UML or Design Patterns ?

Data Structures and Algorithms.

In addition to this, which subjects on mathematics has most impact on coding very well ? Linear Algebra, Discrete Mathematics, Calculus ?

Discrete Mathematics and Number Theory.


You should learn to program in a well structured language first: Ocaml is recommended, Haskell is also good but a bit harder to get a working compiler and harder to learn because it is purely functional.

Mathematics is of little use in programming (the math that is useful is too hard, namely category theory). However some basic type theory is useful.

You can't learn good programming in languages like C, the important stuff is too deeply buried in housekeeping tasks and historical stupidities.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号