Skip to content

Occasional Comment

Another cup of tea, please

Occasional Comment

Some Important Aspects of Programming Languages

One of my favorite characters on TV, Leroy Jethro Gibbs, has a list of rules that he is always quoting to his subordinates. It is an endearing quality that he uses to convince them that he has everything figured out so well that he has it codified into a set of rules.

Alan J. Perlis, winner of the first ACM Turing Award, also has a list of rules, or rather epigrams. He listed a number of them in an article that he published entitled Epigrams on Programming. This is a set of rules for programmers to live by. One of my favorites is:

A language that doesn’t affect the way you think about programming, is not worth knowing. – Alan J. Perlis

I have been finding this particularly true of Python. It is often said that it is not at all hard to write bad code in any language. The converse however is rarely true. Python is the exception though. It is genuinely easy to write good, understandable code in Python.

… programs must be written for people to read, and only incidentally for machines to execute. – Harold Abelson and Gerald Sussman in the preface to their book Structure and Interpretation of Computer Programs

And why is this so? Machines don’t have any problem dealing with complexity. In fact, machines don’t have to understand programs. They just blindly execute them. That is one of the first things that you learn when you start to program.

The reason that you program in a higher level language is so that you can wrap your brain around what your program actually does. And Python helps you do that in several ways. First, by using indentation to indicate the boundaries of a block, it makes scope visually obvious. It also saves lots of time spent arguing about programming style by having the style dictated by the syntax of the language.

Another helpful feature of Python is the distinction drawn between None and False and 0. The first indicates the lack of a value, the second is a boolean value, and the last a numeric value. It is not until you need to make the distinction between these roles in a program that you appreciate a language that doesn’t conflate them. It is easy enough to convert between them when that is what you intend.

The last feature that I will describe is the fact that variables are containers for values. These containers don’t intrinsically have data types. The values they contain have types and those types can be discovered by introspection but just as a variable can store different values at different times, those values are not constrained to always be of the same type.

These three attributes serve merely as examples, not an exhaustive list. The more I use Python, the more I appreciate what a long list of features it is. It meets the criteria set by Seymour Papert for the Logo language:

A language should have a low threshold and no ceiling.

That is to say, you should be able to do interesting things with a small vocabulary of four or five words, and yet do anything you can imagine with the full language.


Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.

Share this:

  • Click to email this to a friend (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to print (Opens in new window)

Like this:

Like Loading...

Related

Author KelliePosted on May 3, 2017Categories blogTags Alan Perlis, Logo, python, Seymour Papert

Post navigation

Previous Previous post: Changes
Next Next post: Retirement is Such a Misnomer
March 2021
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
« Sep    

Pages

  • About Kellie Miller

Blogroll

  • /Message
  • Big Smart Data (Max Goff)
  • BowieChick
  • Javajini’s Flickr Page
  • POSSE
  • Ryan Tomayko
  • Scripting News

Tags

  • 7anby
  • AI
  • arduino
  • art
  • bliss
  • brain-machine interface
  • creativity
  • dog
  • dynamic
  • economics
  • editors
  • exponential growth
  • failure
  • fear
  • flow
  • futurist
  • gradle
  • groovy
  • GTD
  • ham radio
  • intelligence
  • introspection
  • Kentucky Lake
  • Leo
  • lists
  • memoir
  • muse
  • music
  • mystery
  • outlining
  • persistence
  • philosophy
  • process
  • programming
  • python
  • reminder
  • self-reference
  • Sleaze Sinema
  • speed-blogging
  • technology
  • theater
  • tools
  • Western Kentucky
  • writing
  • You Tube

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Archives

  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • February 2019
  • January 2019
  • December 2018
  • September 2018
  • December 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • January 2016
  • December 2015
  • November 2015
  • December 2014
  • October 2014
  • September 2014
  • July 2013
  • May 2013
  • July 2012
  • January 2012
  • July 2011
  • November 2010
  • September 2010
  • July 2010
  • June 2010
  • April 2010
  • February 2010
  • January 2010
  • November 2009
  • October 2009
  • September 2009
  • June 2009
  • December 2008
  • November 2008
  • September 2008
  • August 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • October 2007
  • September 2007
  • May 2007
  • April 2007
  • March 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
Occasional Comment Proudly powered by WordPress
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.
%d bloggers like this: