| Store | Cart

Grouping code by indentation - feature or ******?

From: Antoon Pardon <apar...@forel.vub.ac.be>
25 Mar 2005 14:26:28 GMT
Op 2005-03-25, John Roth schreef <newsgroups at jhrothjr.com>:
>> "Antoon Pardon" <apardon at forel.vub.ac.be> wrote in message > news:slrnd482k3.20i.apardon at rcpc42.vub.ac.be...>> Op 2005-03-25, Tim Tyler schreef <tim at tt1lock.org>:>>> What do you guys think about Python's grouping of code via indentation?>>>>>> Is it good - perhaps because it saves space and eliminates keypresses?>>>> I think it was a mistake, but I'm probably in the minority here.>> Um, why?

1) It makes it hard to see how many levels are dedented at the end of
   a suite, and sometime makes it difficult to see where the end
   of a suite is. If e.g. you are looking at the code spread over
   two pieces of paper, it is sometimes hard to see whether the
   suite ends at the end of the first page or not.

2) It makes it hard to introduce some kind of new syntax constructs.
   Sometimes its isn't clear what would be the best indentation scheme
   for a syntantical structure, or some usefull syntantical won't fall
   in the indentation scheme that python provides. I think it a
   shame that these consideration would limit what constructs
   get into python or not.

3) Sometimes the structure of the algorithm is not the structure
   of the code as written, people who prefer that the indentation
   reflects the structure of the algorithm instead of the structure
   of the code, are forced to indent wrongly.

-- 
Antoon Pardon

Recent Messages in this Thread
Tim Tyler Mar 25, 2005 08:11 am
Peter Otten Mar 25, 2005 08:48 am
Skip Montanaro Mar 25, 2005 12:52 pm
Tim Tyler Mar 26, 2005 03:30 pm
Antoon Pardon Mar 25, 2005 12:56 pm
John Roth Mar 25, 2005 01:22 pm
Antoon Pardon Mar 25, 2005 02:26 pm
Antoon Pardon Mar 29, 2005 07:57 am
Antoon Pardon Mar 29, 2005 07:47 am
Roy Smith Mar 29, 2005 01:35 pm
Kent Johnson Mar 25, 2005 01:51 pm
Carl Banks Mar 25, 2005 02:15 pm
Antoon Pardon Mar 25, 2005 02:41 pm
Diez B. Roggisch Mar 25, 2005 03:02 pm
Antoon Pardon Mar 25, 2005 03:16 pm
Diez B. Roggisch Mar 25, 2005 03:33 pm
Antoon Pardon Mar 29, 2005 07:34 am
Diez B. Roggisch Mar 29, 2005 09:43 pm
Rocco Moretti Mar 25, 2005 05:21 pm
Tim Roberts Mar 26, 2005 09:03 am
Peter Otten Mar 26, 2005 10:29 am
Kent Johnson Mar 26, 2005 12:09 pm
Skip Montanaro Mar 26, 2005 12:41 pm
Peter Otten Mar 26, 2005 07:02 pm
Kent Johnson Mar 27, 2005 02:43 am
Peter Otten Mar 27, 2005 05:42 am
Reinhold Birkenfeld Mar 27, 2005 05:08 pm
projecktzero Mar 25, 2005 02:43 pm
Larry Bates Mar 25, 2005 04:15 pm
Ivan Van Laningham Mar 25, 2005 04:39 pm
James Stroud Mar 25, 2005 07:31 pm
Robert Kern Mar 25, 2005 07:38 pm
Bill Mill Mar 25, 2005 07:47 pm
Larry Bates Mar 25, 2005 09:56 pm
Jeremy Bowers Mar 26, 2005 05:50 am
Ron_Adam Mar 26, 2005 05:36 pm
Mike Meyer Mar 26, 2005 10:52 pm
Terry Reedy Mar 25, 2005 06:42 pm
Paul McGuire Mar 26, 2005 06:13 am
Javier Bezos Mar 26, 2005 09:02 am
Tim Tyler Mar 26, 2005 03:42 pm
Jeremy Bowers Mar 26, 2005 11:17 am
Jacob Lee Mar 27, 2005 07:00 am
Javier Bezos Mar 27, 2005 03:30 pm
Reinhold Birkenfeld Mar 27, 2005 05:11 pm
Javier Bezos Mar 27, 2005 06:04 pm
Myles Strous Mar 30, 2005 06:08 am
Myles Strous Mar 30, 2005 06:13 am
Javier Bezos Mar 30, 2005 06:00 pm
Javier Bezos Mar 28, 2005 06:05 pm
Reinhold Birkenfeld Mar 27, 2005 05:10 pm
Scott David Daniels Mar 27, 2005 09:41 pm
Terry Reedy Mar 30, 2005 01:55 am
Tim Roberts Mar 30, 2005 06:48 am
James Stroud Mar 26, 2005 11:36 pm
Terry Reedy Mar 25, 2005 06:41 pm
Messages in this thread