also visit: Theatre of Noise | Soundings

about: this site | me

subscribe: RSS

11 September 2005

Programming Language Features

This article was first posted on the web sometime before 2002.

Things I'd like to see in a programming language suitable for text, database, interface, and system scripting work. Each feature is followed by a brief description.

Package and general features:

  • Orthogonal structure: Constructed from a small number of powerful constructs for ease of learning and understanding.

  • Reasonable syntax: Simple, clean, readable.

  • Portable: To all major platforms.

  • Access to system calls: UNIX and Win32.

  • Interface to external programs: Ability to catch errors, note the exit status, and redirect I/O.

  • Foreign function interface: Ability to dynamically load and execute functions written in another language.

  • Module system: With protected namespace.

  • Extensive standard library: For functionality not provided by the language.

  • Language standard: One implementation.

  • Freely distributable: Avoids license fees and restrictions.

  • Interpreted implementation: For quick ad-hoc development and machine independence.

  • Compiled implementation: For faster execution and protected code if distributed.

  • Embedded implementation: For use within another application (eg: web server).

  • Interactive source debugger.

  • High-level portable GUI: For easy data entry.



Specific language features:

  • Automatic memory management

  • Full set of data types: Support for strings, lists, arrays, records / structs, tuples, sets, unions.

  • Fully assignable data types: Ability to make list of lists, array of strings, etc. without recourse to pointers.

  • Recursive functions

  • Binary (8-bit) data handling

  • Unicode (16-bit) data handling: Needed for proper XML.

  • An object system: Multiple inheritance a plus as it allows a high degree of code-reuse.

  • Strong typing: To prevent type mismatches.

  • Exception handling: For better error checking.

  • Static typing: Catch type errors at compile-time.

  • Definable control structures: A macro system or normal order evaluation.

  • Pattern matchingr: egular expression support.

  • Dynamic calling sequences.: The ability for functions to accept optional or unlimited arguments.

  • Dynamic typing and name resolution.: Allows expression of generic operations.

  • Multiple return values from functions

  • Circular data structures: In a natural syntax.

  • Reflexivity: Ability to access data about the language and programming environment itself.



Following this analysis, I chose Python.

Oblique Strategies

The Oblique Strategies were originally a set of one-hundred cards, each bearing a short phrase. They were devised by Brian Eno and Peter Schmidt as ways of working through creative problems. When a blockage occurs, draw a card, and see if it can direct you in a tangential way that helps solve the problem.

I have created a Python implementation that includes two different decks.

The first deck is made up of version four of the printed cards, including all corrections, plus any strategies that were deleted from that edition but
found in previous printings, and also additional strategies taken from "A Year With Swollen Appendices: The Diary of Brian Eno".

The second deck is made up of my own strategies, devised over some time and still evolving. These were not written with any reference to the original Oblique Strategies but are designed to function in a similar way.

To use this program you will require Python 2.3 or higher. It is available as a free download. Download ObliqueStrategies.py and run it from the command line or your favourite Python interactive environment. It will print a random strategy. There is a parameter to specify the deck; the standard UNIX "--help" switch will tell you all about that.

Thanks to Paul for inspiration. Hope this helps you make some music!