Guido's intuition (was Re: typetesting, adaptation, typeclasses, ...)

Tim Hammerquist tim at vegeta.ath.cx
Sun Feb 3 02:40:12 CET 2002


Tim Peters <tim.one at home.com> graced us by uttering:
> [Andrew Koenig]
>> It seems to be universal among programmers that they get hung up about
>> tiny syntax details until they get used to those details.  For example,
>> C and C++ programmers still argue about where to put the curly braces
>> in their programs.
> 
> That's because they don't have Guido to force them to do it the right way:
> 
> 	if (guido) {
> 		tab(indent);
> 	}

I was required to use BSD-style for school, but the "wasted" vertical
space offended my senses, so I settled on K&R. Never could understand
GNU or Whitesmith style, though. =)

BTW, less wasted v-space is one very attractive feature of Python.

My eyes just can't parse:

if ( some_condition() ) {
  {
    for (i = first_i();i <= 10; i++)
      {
        initialize_some_stuff();
        while ( some_other_condition() )
          {
            do_some_more_stuff()
          }
      }
  }

...yet I have no trouble parsing

if ( &some_condition ) {
    for $i (&first_i .. 10) {
        &initialize_some_stuff;
        &do_some_more_stuff while &some_other_condition;
    }
}

Imagine a "Lisp-style" indent!

if ( some_condition() ) {
    i = first_i();
    for (i = first_i(); i <= 10; i++) {
        initialize_some_stuff();
        while ( some_other_condition() ) {
            do_some_more_stuff() } } }

<Real-programmers-use-1TBS>-ly y'rs,
Tim Hammerquist
-- 
Note that by displacing from "I got confused" to "It got confused", the
programmer is not avoiding responsibility, but rather getting some analytical
distance in order to be able to consider the bug dispassionately.
    -- Jargon File 4.3.1



More information about the Python-list mailing list