After read Allman Style, K&R style, GNU style
https://en.wikipedia.org/wiki/Indentation_style
ISO C99, ISO C++ 2011, ISO C++ 2014, ISO C++ 2020
https://www.mediafire.com/file/3xy4u72o4g9uft2/ISO_C_and_C%252B%252B__International_Standard.zip
Hungarian notation & its history
https://idleloop.com/hungarian/
https://en.wikipedia.org/wiki/Talk%3AHungarian_notation
https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/general-naming-conventions
The Psychology of Computer Programming & An Introduction to General Systems Thinking by Weinberg
https://en.wikipedia.org/wiki/Gerald_Weinberg
Also wrote in many system:
Linux kernel, Zephyr, C#, Inline assembly, Android framework & App, IOS Object-C App, Python3 for AI, Scala for Risc-V, Buildroot, Bash, Makefile and trace GNU gcc source. Then post this topic.
The left brace used in GNU is similar to Allman style, that is placed on the next line of the conditional expression.
The Linux kernel uses the K&R style, that is placed on the end of the conditional expression.
Some people say it's better on the next line, some people say it's better at the end of the line.
In python3 there is no brace problem at all.
The less programmatic semantics are combined or simplified in the brain, the easier to read.
So, engineers have more time to focus on security, speed, cpu loading.
Many ruler who set the company's syntax rules they forget...
For examples:
1. Try to understand new syntax of other's syntax
3. Pay more attention to system security, speed and loading
If so you will be a good syntax ruler!!!
Translate in Chinese, I buy the e-boos, so please buy them to support the author.
回覆刪除1.
https://www.mediafire.com/file/xcnu3hys9tbskn1/An_Introduction_to_General_Systems_Thinking.pdf
2.
https://www.mediafire.com/file/trx2ro46brvcw4c/The_Psychology_of_Computer_Programming.pdf