[WEBINAR] Application Acceleration: Faster Performance for End Users

Egyptian Brackets

Definition - What does Egyptian Brackets mean?

“Egyptian brackets” is an IT slang term for situations where programmers include a curly bracket that contains a function at the end of a code line after the function name, arguments, conditional statements or anything else that precedes the actual function code. The second curly bracket is located on its own line of code, underneath the last line of code contained in the function. This results in the first bracket being situated above and to the right of the second bracket, which in a general sense mimics the construction of a conventional Egyptian hieroglyphic showing a dancer. For this reason, this code layout convention is called “Egyptian brackets.”

Techopedia explains Egyptian Brackets

Egyptian brackets are also called K&R C style, named for programmers Brian Kernighan and Dennis Ritchie who supposedly pioneered this style in the 1970s. The use of Egyptian brackets goes to the heart of how coders determine how to structure function code. One might think that the more common convention would be to include both curly brackets on one line, with the code in the middle. However, it is far more common for programmers to include each curly bracket on a separate line, so that both brackets sit at the far left of the screen. Critics call this poor layout and point to the overuse of code lines, but others contend that having the brackets on the left and on their own lines makes code more readable and enhances its aesthetic.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.