Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
C++RAD Studio

What Are The Rules Of Modern C++?

What Are The Rules Of Modern C++

Hello developers, actually there are no rules! 😁 You have a broad freedom in C++. If your C++ app is running well and performing its functions well then, you’re doing good. For me, I think this is the main rule of developing applications, “develop C++ apps running perfectly that help people and the world“. In professional programming, you strive to create better applications that run perfectly and use memory, CPU, and GPU efficiently. But of course, joking apart, in reality, all computer programming languages actually do have rules; both those of syntax and those of semantics. This week we have more new C++ posts about some minor and major important rules of modern C++.

If you are just starting out on your C++ journey and want to jump into the rules of modern C++, there is a free version of C++ Builder, C++ Builder 11 CE Community Edition released in April 2023. If you are a start-up developer, student, hobbyist, or just interested in learning to code then the C++ Builder Community Edition may well be just the thing for you.

All of the C++ examples in these posts can be used with C++ Builder Enterprise, Architect, Professional Editions, or the free version C++ Builder 11 CE Community Edition.

How can we learn the rules of modern C++?

In modern C++, when you develop applications for future updates or upgrades to new compilers, and you want to use memory, CPU, GPU, and other peripherals of that device in a correct way, there are some recommendations in class definitions. In class definitions, there are some recommendations; called The Rule of Zero, Rule of Three, Rule of Five, and Rule of Six.

In modern C++, there are some rules to support the principles of programming, one of which is the Rule of Six in C++ (also known as the Rule of Five, excluding the constructor). In the first post, we explain the Rule of Six in C++ that includes other the Rule of 5, the Rule of 3, and the Rule of 0. https://learncplusplus.org/what-is-the-rule-of-six-in-modern-c/

In the next post, we explain the Rule of Five in C++ (also known as the Rule of Six, including constructor) https://learncplusplus.org/what-is-the-rule-of-five-in-modern-c/

The Move Assignment Operator is one of the great features of Object-Oriented Programming in professional development. It complements features like the copy assignment operator, copy constructor, move constructor, and destructor. Since the C++11 standards, the move assignment operator is declared by using “operator=” and it allows you to move one object to another object. In the next post, we explain what a move assignment operator is along with some C++ examples. https://learncplusplus.org/what-is-the-move-assignment-operator-in-modern-c/

When you define your variable you should know well what it is to be used for. Is it a numeric or alphanumeric variable or a binary data that holds all kinds of bytes. If it is a numeric value, what are its limits? If it is between 0 to 255 you don’t need to define with int, an unsigned char (UBYTE) is enough. This may speed up your code 1-4 times faster. If it is a larger number, you can use long, long long, or unsigned long long int for positive numbers. These small rules are especially important when you are doing loop operations.

In the early days of C++, there were fewer data types such as char, float, and int. Over time these types improved with new additions. The C++ language is really amazing, it allows you to define your data type by the limits of your variable values. One of the largest integer types is the unsigned long long or unsigned long long int and in the next post, we explain how to use the long long int type. https://learncplusplus.org/what-is-the-long-long-int-type-in-c/

Maybe another ‘rule’ is using libraries and components wisely to make your applications glamorous. For example, applications with modern UI elements such as graphics and charts. The RAD Studio, C++ Builder 11, and C++ Builder CE Community Editions have a lot of amazing visual and nonvisual components that you can use in your modern applications for Windows and mobile. One of these is the free chart component for the VCL and FMX frameworks called TeeChart (TChart). TChart comes with RAD Studio including RAD Studio 10.x, 11.x, and the CE versions. https://learncplusplus.org/learn-how-to-draw-charts-with-simple-teechart-tchart-examples-in-c/

Are there C++ examples of how to apply the rules of modern C++?

LearnCPlusPlus.org has been producing full of educational daily articles about C and modern C++ that can be used with C++ Builder, C++ Builder CE, Dev-C++, BCC Compiler and some other compilers such as the GCC compiler. Here are our post picks for today.

We like to hear your feedback. You motivate us so much with your likes and comments on social media (find us on Facebook, LinkedIn, Reddit, Twitter and all over) and here on the blogs too. Thank you for your valuable comments and questions. All of them help improve the quality of our future posts and new code in these posts.

We have a lot of unique posts waiting to come. We keep adding new topics every week about C++ in general and specific topics for C++ Builder, Dev-C++, and for the other C++ compilers. Please keep following our LearnCPlusPlus.org website for the latest posts and updates. Feel free to comment and share with your colleagues, students, members – knowledge is power, and knowledge shared is empowering.

What is new in C++ Builder CE?

C++ Builder 11 CE which is the free Edition of C++ Builder has been recently released. Embarcadero has made available a Community Edition license for the most recent 11.3 release of Delphi and C++Builder. This is a free edition of either Delphi or C++Builder for students, hobbyists, and startups (as the license is revenue-limited).

What Are The Rules Of Modern C++ The CE splash screen

What might be next for C++ Builder?

According to David Millington’s post, C++ Builder is aiming to include some amazing features; CLANG v15, support for C++20 and a lot of C++23 features, Win64 primary OS, new code completion, Visual Assist C++ navigation and refactoring, and lots more.

Disclaimer: All new features and improvements discussed in posts regarding future versions of RAD Studio are not committed until completed, and GA released.

Note that Embarcadero announced the release of RAD Studio 11 Alexandria Release 3, also known as RAD Studio 11.3, along with Delphi 11.3 and C++Builder 11.3. This release is focused on quality and improvements, building on the great new features in RAD Studio 11 Alexandria three previous releases.

What Are The Rules Of Modern C++ C++ Builder logo

C++ Builder is the easiest and fastest C and C++ IDE for building simple or professional applications on the Windows, MacOS, iOS & Android operating systems. It is also easy for beginners to learn with its wide range of samples, tutorials, help files, and LSP support for code. RAD Studio’s C++ Builder version comes with the award-winning VCL framework for high-performance native Windows apps and the powerful FireMonkey (FMX) framework for cross-platform UIs.

There is a free C++ Builder Community Edition for students, beginners, and startups; it can be downloaded from here. For professional developers, there are Professional, Architect, or Enterprise version.

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Dr. Yilmaz Yoru has 35+ years of coding with more than 30+ programming languages, mostly C++ on Windows, Android, Mac-OS, iOS, Linux, and some other operating systems. He graduated and received his MSc and PhD degrees from the Department of Mechanical Engineering of Eskisehir Osmangazi University. He is the founder and CEO of ESENJA LLC Company. His interests are Programming, Thermodynamics, Fluid Mechanics, Artificial Intelligence, 2D & 3D Designs, and high-end innovations.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.