-
Notifications
You must be signed in to change notification settings - Fork 0
RADProgrammer Style Guide
Pascal was named in honor of the French mathematician Blaise Pascal and was designed by Niklaus Wirth at the Eidgenössische Technische Hochschule in Zurich, Switzerland. The first compiler appeared in 1970 and the first language specification was published in 1971 and updated again in 1974. The first two paragraphs of the introduction to this report describe Wirth's reasons for developing Pascal:
The development of the language Pascal is based on two principal aims. The first is to make available a language suitable to teach programming as a systematic discipline based on certain fundamental concepts clearly and naturally reflected by the language. The second is to develop implementations of this language which are both reliable and efficient on presently available computers.
The desire for a new languuage for the purpose of teaching programming is due to my dissatisfaction with the presently used major languages whose features and constructs too often cannot be explained logically and convincingly and which too often defy systematic reasoning. Along with this dissatisfaction goes my conviction that the language which the student is taught to express his ideas profoundly influences his habits of thought and invention, and that the disorder governing these languages directly imposes itself onto the programming style of the students.
If you are reading this guide, you probably agree that Pascal is a well structured, easy to read language and that it also helps you naturally produce results in a more efficient manner. My assertion is the achievement of this goal is greatly enhanced by the formatting of code in a standardized fashion for improved readability. This sounds easy in theory but is rarely easy in practice as nearly every single developer has their own preferred style of coding. As such, there can never be a coding standard created which makes all developers happy. This particular guide is based on more than two decades of improvements to a particular coding style and it is still open for further modifications and improvements.
You will note that there are no rules discussed about tabs, spaces, alignments, and line breaks in this guide other than the settings for the automatic Source Code Formatter. It is best to simply lean on the tooling and let it handle these pesky formatting issues. Simply use CTRL-D
and accept the formatting applied and move on to more important matters. (Note: the settings referenced below are saved in the Formatter_RADProgrammer.config Copy this file to your %APPData%\Embarcadero\BDS\21.0
directory and then use the Tools
->Options
->Language
->Formatter
->Profiles and Status
configuration screen to select this saved profile in the Profiles
combobox and click the Apply
button to activate the profile; or use the Load...
button to load the config file from an alternative location. The BDS\21.0
directory is for 10.4 Sydney and will need to be adjusted for your current RAD Studio version.)
Changes to this guide can be proposed via the creation of a new Issue on the Style Guide's repo on GitHub. As changes are implemented, updates to this guide will be posted to GitHub and a new IDE formatter profiler config will follow as needed.
All RADProgrammer programming projects will follow this Style Guide and make use of the built-in source code formatter to help assure compliance. However, programming is a very creative process. Please do not let these guidelines greatly reduce your productivity. An old adage applies: first make it work, then make it work better. Lean
There are a few major areas of concern of this Coding Style Guide, including: