What is the term(s) used to describe programming language syntax?
Is there an exact/correct term to describe this difference between the syntax/constructs of programming langauges e.g VB6 with its (if ... else ... endif) and C# with its curly braces for conditional statements.
I'm using VB6 syntax and C# as examples since I'm more famil开发者_JAVA百科iar with their syntax.
For example, Visual Basic 6's syntax uses a more verbose, natural language like structure.
If (id = 0) Then
id = MyObject.Add(Me)
Else
Call MyObject.Update(Me)
End If
while C# has more concise syntax like:
if (id == 0)
{
id = MyObject.Add(this);
}
else
{
MyObject.Update(this);
}
Conciseness? Natural languageness? Or is there a more "scientific" word for describing syntax?
You may be looking for the word "terse", as in the opposite of verbose.
Syntax seems to be described in terms of what it most resembles, C#'s syntax is based off of C syntax, Lisp is based off of parentheses, Basic is influenced by Fortran etc. I found this table pretty interesting http://en.wikipedia.org/wiki/Comparison_of_programming_languages_%28syntax%29#Blocks
精彩评论