DEV Community

Cover image for Why Use a Language Like C++?
William Torrez
William Torrez

Posted on • Edited on

1

Why Use a Language Like C++?

  1. Compiled Languages and C++

1.1 Why Use a Language Like C++?

At its core, a computer is just a processor with some memory, capable of running tiny instructions like “store 5 in memory location 23459.” Why would we express a program as a text file in a programming language, instead of writing processor instructions?

The advantages:

  1. Conciseness: programming languages allow us to express common sequences of commands more concisely. C++ provides some especially powerful shorthands.
  2. Maintainability: modifying code is easier when it entails just a few text edits, instead of rearranging hundreds of processor instructions. C++ is object oriented (more on that in Lectures 7-8), which further improves maintainability.
  3. Portability: different processors make different instructions available. Programs written as text can be translated into instructions for many different processors; one of C++’s strengths is that it can be used to write programs for nearly any processor.

C++ is a high-level language: when you write a program in it, the shorthands are sufficiently expressive that you don’t need to worry about the details of processor instructions. C++ does
give access to some lower-level functionality than other languages (e.g. memory addresses).

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (1)

Collapse
 
jodoesgit profile image
Jo

Would this boil down to something specific? Like working with hardware versus software? Cause I feel like that might be part of it. But I'm not entirely sure. I actually know more now about C++ than I did before. Which was absolutely zero, beyond its name. Thank you, my brother!

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay