Changes

Jump to navigation Jump to search
m
→‎Describing a programming language: expand semantics comments
Line 8: Line 8:  
While human languages such as English may have rules of grammar, there are almost always exceptions to these rules.  To reduce ambiguity, most programming languages have their [[grammar]] or syntax rigidly defined by a relatively small number of rules, with no exceptions.  In many cases some variation of a [[Context-Free Grammar|context-free grammar]] is used, often Backus-Naur Form, or some extension thereof.  Note that context-free grammars are not powerful enough to describe human languages such as English.
 
While human languages such as English may have rules of grammar, there are almost always exceptions to these rules.  To reduce ambiguity, most programming languages have their [[grammar]] or syntax rigidly defined by a relatively small number of rules, with no exceptions.  In many cases some variation of a [[Context-Free Grammar|context-free grammar]] is used, often Backus-Naur Form, or some extension thereof.  Note that context-free grammars are not powerful enough to describe human languages such as English.
   −
The meaning or [[semantics]] of any particular construct in a programming language is most commonly described in fairly precise English.  Several unsuccessful attempts have been made to find a formal way of describing the semantics.
+
The meaning or [[semantics]] of any particular construct in a programming language is most commonly described in fairly precise English.  Several unsuccessful attempts have been made to find a useful and formal way of describing the semantics.
    
The more important programming languages have an internationally-agreed official standard (ISO is the international standards organisation, ANSI is the standards body in the United States). In theory, programs which conform to the relevant standard should be usable on most types of computer; this works in practice most of the time, provided that the programmers have been careful to avoid machine-dependencies. Such agreed standards are usually revised every 5 to 15 years, often with new features being added, and sometimes with old features being either removed or marked as obsolete.
 
The more important programming languages have an internationally-agreed official standard (ISO is the international standards organisation, ANSI is the standards body in the United States). In theory, programs which conform to the relevant standard should be usable on most types of computer; this works in practice most of the time, provided that the programmers have been careful to avoid machine-dependencies. Such agreed standards are usually revised every 5 to 15 years, often with new features being added, and sometimes with old features being either removed or marked as obsolete.
SkipCaptcha
265

edits

Navigation menu