Print

Print


\On 3/26/06, Joe <[log in to unmask]> wrote:
\> I wouldn't equate 'concise' with 'better', with programming languages or
> natural ones.  Conciseness in a programming language usually occurs at
> the expense of readability,

By that argument we would get maximum readabiilty by programming in
assembly.  :)

The power of high-level languages lies largely in concision: the fact
that you can represent an algebraic formula as an algebraic formula
rather than a series of instructions.  "load m; mult c; mult c; store
E" doesn't immediately make the reader think "E = mc^2".

It's mostly a question of chunk size: what is the complexity of the
basic units that the language lets you manipulate easily?   More
expressive languages - which are by definition more concise - let you
do things more elegantly by letting you think about the problem at a
more abstract level and manipulate "things" that are more complex
without having to deal with all that internal complexity every time
you do any manipulation.  You can consider just the parts important to
the operation at hand, and the rest comes along for the ride...

So it's an unfair generalization to say that conciseness in a proglang
occurs at the expense of readibility - even "usually".  Verbosity can
actually get in the way of comprehension.  To the uninitiated, even a
simple "Hello, world" program in Java is intimidating because of all
the boilerplate required to get it to compile and run.  Plus you're
calling a method on a file descriptor object that is an attribute of a
global object representing the interface to the operating system . . .
that's a lot of conceptual baggage just to say "output this, please.".
 Whereas the corresponding program in Perl - the poster child for
illegibility - is a single line that says 'print "Hello, world!\n";'. 
The only things you have to explain are the \n and maybe the
semicolon.
In general,  I'll take expressiveness over verbosity any day.   Maybe
that's why I prefer inflection to agglutination. :)



--
Mark J. Reed <[log in to unmask]>