Home #
Created Wednesday 16 October 2019
Why learn C++ #
Except that C++ is fastđ ď¸, it helps in learning about:
- Free-flow syntax - used in other langs like JS, Java, Go, C#, PHP
- Simplest scoping rules.
- Concept of data types, static typing.
- Manipulate data directly at the bit level.
- Pointers and memory management.
- Multiple paradigms together:
- Structured programming - write like C. Use functions and pointers only.
- OOP:
Operator overloading(make your own operators from scratch) Strict encapsulation - constrained access to objectâs members
- Preprocessor
- Compiler and Linker
Note:
- These concepts are used in almost all languages - in some way or the other. So youâll be comfortable with new langs very quickly.
- Many languages can be seen as an abstraction over C++, so it helps in understanding their features better. Javascipt, Go, Java. Youâll have a good foundation to reason about langs like C++.
- Important: Using C++ for learning other langs is not always beneficial or even possible - every language has its philosophy, style and quirks. Langs like Haskell, Lisp are completely different. Plus, it is boring to use the same style, philosophy.
C++ is used for #
Writing very efficient code - time and memory wise. So, it is mostly used for implementing tools and libraries.
- Competitive programming - nothing personal.
- System software - operating systems, database engines, critical parts of a backend
- Game Development and graphics tools - Unreal engine, Unity
- Game development in general
- Writing interpreters for other langs - V8
- AI/ML/BigData libraries and tools - Tensorflow, PyTorch
C++ is not used for #
Higher level stuff.
- Data science/AI/ML
- Web Development
- Mobile Development
- Scripting
Issues #
- Learning C++ can seem boring, because itâs not useful for higher level stuff - images, videos, websites. You canât see progress.
- Rapid prototyping is not a feature. However, there exists a Jupyter REPL for C++.
- It takes time to learn, the syntax is cryptic. But not complicated.