Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Programming languages can often be described as verbose or terse.

From my understanding, a verbose language is easy to read and understand, while a terse language is concise and neat, but more difficult to read. Should there be other things to consider in the definitions?

It seems much of the popular programming languages of today are verbose, and these terms two terms are only used to describe a language as being more or less, relative to than another language.

How do we determine if a programming language is more verbose/terse over another?

Example: Is C# more verbose than Java?

share|improve this question
add comment

4 Answers

up vote 21 down vote accepted

From my understanding, a verbose language is easy to read and understand, while a terse language is concise and neat, but more difficult to read.

This is false. Verbose means lots of symbols. Terse means fewer symbols.

This has nothing to do with ease of reading or ease of understanding.

Some folks find verbose COBOL easy to read, other find it confusing because so many symbols are required to do so little.

Some folks find terse I/J/K and APL easy to read because the program is very short. Others find it hard to read because the symbols are obscure.

Terse/Verbose has no relationship with easy to read or easy to understand.

Should there be other things to consider in the definitions?

No. The definitions of terse and verbose are fine.

What's important is that these definitions have nothing to do with "easy to read and understand"

It seems much of the popular programming languages of today are verbose.

Really?

How do we determine if a programming language is more verbose/terse over another?

Count tokens to get something done.

Add 2 TO A GIVING B.

7 tokens

b = a + 2;

6 tokens

http://dictionary.reference.com/browse/verbose

http://dictionary.reference.com/browse/terse

share|improve this answer
3  
+1 for "Terse/Verbose has no relationship with easy to read or easy to understand." I always think of mathematical notation which, when properly done, is remarkably dense yet still relatively readable. –  Frank Shearar Feb 21 '11 at 15:39
2  
@sunpech: That's what the English words mean. "verbose" means a lot of words. "terse" means fewer words. Nothing to do with readability. Simply word counts. All I did was replace "word" with "token". It's just English, nothing special. –  S.Lott Feb 21 '11 at 15:54
1  
We might also consider the length of the tokens. Common Lisp looks wordy because so many of the keywords are long, and that also adds to the verboseness of COBOL. –  David Thornley Feb 21 '11 at 16:06
1  
@Frank Shearar: Absolutely untrue, think about the time it takes for students to learn mathematics. It's as unreadable as it can get (serious mathematics) and even after 6 years of secondary education the majority still are unable to seriously read it. Not that being unreadable is a bad thing! But saying that mathematics is a readable notation is a shortsighted comment ot say the least. –  David Mulder Mar 27 '12 at 18:34
1  
@DavidMulder: Mathematical notation varies wildly, so I suspect we're both committing sins of hyperbole. Surely you consider the notation for algebra, set theory, basic calculus to be transparent? On the other hand, I consider tensors' abstract notation to be unreadable nonsense. (But then, I also didn't take the time to learn the notation properly.) –  Frank Shearar Mar 27 '12 at 19:49
show 6 more comments

How do we determine if a programming language is more verbose/terse over another?

By comparing the equivalent or similar language constructs, specifically how the same or equivalent task can be solved in one language vs the other.

Is C# more verbose than Java?

Java is in general more verbose than C#. The most obvious differences include delegates and lambda expressions, where Java requires defining, subclassing and instantiating a distinct interface in order to achieve what is possibly done using a single lambda expression in C#.

share|improve this answer
add comment

Give a code snippet to non-programmer and ask him/her to explain what that snippet trying to do. If you get closest answer, then it is verbose. if you get WTF expression then it is terse.

share|improve this answer
add comment

The measure is called expressiveness of the language. The typical metric for this is measuring standardized lines of code or statements needed to implement same functionality.

Some values from the Wiki -- how many statements/lines of C code does it take to implement one functionality of one statement/line in:

  • C -- statements: 1 lines: 1
  • C++ -- statements: 2.5 lines: 1
  • Fortran -- statements: 2.5 lines: 0.8
  • Java -- statements: 2.5 lines: 1.5
  • Perl -- statements: 6 lines: 6
  • Smalltalk -- statements: 6 lines: 6.25
  • Python -- statements: 6 lines: 6.5
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.