🟒

Syntax (in Programming)

Category
Basic Terms
Tags
πŸ§‘β€πŸ’»Code
🟒
Definition: Syntax is the set of rules that tell you how to correctly write and structure code in a specific programming language.

Syntax is the basic foundation upon which a programming language is built.

If syntax were not properly followed, a programming language would be unreadable and unusable.

To visualize this, imagine if the English language had no syntax rules.

This would result in something akin to a toddler's babbling, where words were thrown together haphazardly with no regard for proper grammar, punctuation, or meaning.

While it might be possible to understand some of what the toddler is trying to say, it would be very difficult to carry on a conversation with them.

In the same way, if syntax rules were not followed in programming, it would be very difficult for computers to understand the code that humans write.

Computers are extremely literal creatures, and they must have specific instructions in order to carry out the desired actions.