The Artima Developer Community
Sponsored Link

Python Buzz Forum
Space sensitive programming

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Thomas Guest

Posts: 236
Nickname: tag
Registered: Nov, 2004

Thomas Guest likes dynamic languages.
Space sensitive programming Posted: Aug 10, 2007 3:03 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Thomas Guest.
Original Post: Space sensitive programming
Feed Title: Word Aligned: Category Python
Feed URL: http://feeds.feedburner.com/WordAlignedCategoryPython
Feed Description: Dynamic languages in general. Python in particular. The adventures of a space sensitive programmer.
Latest Python Buzz Posts
Latest Python Buzz Posts by Thomas Guest
Latest Posts From Word Aligned: Category Python

Advertisement

I recently started reading Introduction to Algorithms, a classic text on the subject of computer algorithms. Algorithms are described using a home-brewed pseudocode, about which the book says:

We use the following conventions in our pseudocode.

  1. Indentation indicates block structure. … Using indentation instead of conventional indicators of block structure, such as begin and end statements, greatly reduces clutter while preserving, or even enhancing clarity. [2]

Sounds good. But before we get too excited, the referenced footnote says:

2In real programming languages, it is generally not advisable to use indentation alone to indicate block structure, since levels of indentation are hard to determine when code is split across pages.

I’ll stick with Python’s conventions on this one. I can take the page-split hit – which I’d never noticed, to be honest. Reduced clutter. Enhanced clarity. Win win.

Read: Space sensitive programming

Topic: ElementTree returns normal strings if given a 7-bit document Previous Topic   Next Topic Topic: XO B4

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use