tags:

views:

477

answers:

7

I think the more verbose, the more beautiful code is. Code is meant to be read by computers and humans. Verbose, correct code therefore serves humans and computers best, and therefore is the most beautifull code. With Linq, I have seen some code (but unfortunately can't post here due to rights etc).

Please do not discuss about verbosity=beauty. Please just post vrbose code you like. Please remove all discussion about verbose is or is not beautifull. This belongs not in this question.

+1  A: 

check any Lua code. it's really nice

Javier
+6  A: 

You really don't want to see COBOL then ... it will spoil your perception. Once you pass a certain point, the verbosity obscures the intent. The screaming caps and poor (generally) variable naming conventions won't help either.

Generally, I want a language where I can clearly see the intent with as little code as possible.

Nerdfest
+2  A: 
DEFINE ANSWER QUESTION: COBOL() START WHY WOULD ANYONE WANT SOMETHING THIS DAMN VERBOSE END

Not that I actually speak cobol, but the one or two times I've had to read it, I've been struck by things like:

ADD ONE TO VALUE

...where most of us now say value++ or value+=1. The excessive use of capitols makes my head spin, as well.

For the really, really, verbose, you can't beat an assembly language:

load $15, ($20)
load $16, 1
add $15, $15, $16
store ($20), $15

Hopefully, we can agree that this serves the computer wonderfully, but only serves the most OCD of psychotic programmers.

+2  A: 

Keep in mind, there is a balance, merely increasing verbosity won't make the code more readable, its only relevant to the task.

sure, you could verbosify the humble

if ( cond ) { 

}

out to

When the status of the argument commonly known as cond occurs as  a boolean value that is true, or any integer that is not zero, or any string that is not empty, begin to execute the following code :

and seriously, if you wrote programming code like that, 2 things would happen:

  1. You would never get anything done
  2. Maintaining code would be hell
  3. Any developers in your employ would become somewhat suicidal.

Conciseness and shared understanding of terms and expressiveness, in my humble opinion, is far more valuable in measurable terms than verbosity.

Kent Fredric
So that's why programming and politics don't match ;-).
Gamecat
+7  A: 

I have to disagree strongly. In writing as well as in programming, be concise, to-the-point and direct.

Remember Mark Twain: "I didn't have time to write a short letter, so I wrote a long one instead"?

Stephan Eggermont
A: 

IMHO...

Verbose != Beautiful

  • Duff's Device == Beautiful

  • Inv Sqr Root from Quake 3 == Beautiful

  • E=mc2 == Beautiful
    (although, for maintainability, Energy = Mass x SPEEDOFLIGHT2 might be better)

  • Maxwell's Equations == Beautiful

  • Stuff that I wrote when I was a student and thought everyone was as much of a noob as me != Beautiful

It should only be as verbose as needed to make it understandable to competant professionals, anything more is wasting everyone's time, bytes, and money.

seanb
A: 

Verbosity can be very ugly. Try using Oracle Pro*C with ANSI method 4, to construct a query, where the columns are specified as parameters in a table. Oh yes, did I mention that for performance reasons we need you to fetch 10000 rows per Oracle round trip? Yes, and I have 15 different types of bind variables that need to be specified as part of the where clause.

My viewpoint is that code cost money. Everytime you write a line of code, it costs a couple of dollars. Higher verbosity programs have a higher development cost and a higher maintenance cost. Maybe that is not such a good thing.

EvilTeach