Succinctness Is Power

An article by PaulGraham May 2002.

http://www.paulgraham.com/power.html


The idea that 'succinct = powerful' seems, to me, rather flawed... as though running the language through a bzip2 compressor would make it 'more powerful'. I believe that expressive power in a language arises from its ability to (directly) express certain ideas, period. If one language can express every idea that another can express, and utilize them correctly, and adds a few ideas... that's what makes it 'more powerful'.

Higher-level languages have a purpose in increasing the level of abstraction at which a programmer may operate. They allow one to work with higher-level ideas. That this also happens to reduce lines of code in many programs is a happy side-effect. But, if you want succinctness, all you need to do is build a good, turing complete macro system for the language. If all you had was macro-language atop Machine Code, you could become quite succinct without ever once expressing a higher-level idea like an 'unfold'.

This is one of the attractions of ForthLanguage. --IanOsgood


re: bzip2 compressor

Paul Graham himself addresses this idea in the essay:

Small in what sense though? The most common measure of code size is lines of code. But I think that this metric is the most common because it is the easiest to measure. I don't think anyone really believes it is the true test of the length of a program. Different languages have different conventions for how much you should put on a line; in C a lot of lines have nothing on them but a delimiter or two.

Another easy test is the number of characters in a program, but this is not very good either; some languages (Perl, for example) just use shorter identifiers than others.

I think a better measure of the size of a program would be the number of elements, where an element is anything that would be a distinct node if you drew a tree representing the source code. The name of a variable or function is an element; an integer or a floating-point number is an element; a segment of literal text is an element; an element of a pattern, or a format directive, is an element; a new block is an element. There are borderline cases (is -5 two elements or one?) but I think most of them are the same for every language, so they don't affect comparisons much.


PaulGraham asks:

"Are there languages that force you to write code in a way that is crabbed and incomprehensible?"

Some would argue that AplLanguage is the quintessential WriteOnlyLanguage. --- DaveVoorhis


"Succinctness" is in the eye of the beholder. Further, you should write code for a team, not for yourself, and thus should have some knowledge of average team WetWare.


See also: LinesOfCode


EditText of this page (last edited May 15, 2014) or FindPage with title or text search