Ted Leung on the air
Ted Leung on the air: Open Source, Java, Python, and ...
Mon, 02 Feb 2004
Hashtable oriented programming
Ian Bicking picked up on yesterday's post on Lisp/Python and makes an excellent point about hashtables. One of the great strengths of Python is that it makes dictionaries very easy. You can also pun the syntax to make things look like hashtables, and I agree that this is a strength in many applications, particularly "scripting" tasks. When you want this sort of notation, you want it badly because it makes the code much more succinct.

Then I started thinking about it some more. What if you took a language that was easy to reason about, and embedded a dictionary/hash-table oriented programming model in it? If you had a mechanism for syntactic extension, like Ben wants, then you would only pay for this very useful feature when you needed it, and you could make it look like part of the language proper. Of course, there aren't many languages where you could do this. You'd be limited to languages with some sort of macro system. Maybe I've just imbibed a bit too much of the Lisp/Scheme multi-paradigm view of the world.

I'm very interested in apps that are driven off of semi structured data models, and a hash-table oriented programming model makes a large amount of sense for these applications -- in fact, this is one of the reasons that Python was selected for Chandler. At the same time, many of those applications want to do tasks that remind me of AI programs. Some of these tasks are computationally intensive, and efficiency becomes a concern. And lastly, those applications need a good way to talk to a human, which means that the ability to integrate/talk to existing libraries of widgets, speech synthesizers, etc is also a must. So far, I haven't found a single language that incorporates all of these possibilities.

In any case, this is very thought provoking, and helping to get a deeper understanding of Python than I had before. I know the Lisp/Scheme multiparadigm stuff well because I studied it in school and followed it as a research thread in graduate school. I still consider myself a Python beginner, since I haven't dabbled in the Python object system internals, etc. So all of this is helping me to become a better Python programmer.

[23:57] | [computers/programming] | # | TB | F | G | 7 Comments | Other blogs commenting on this post


There are four ways to do this in Microsoftland. I'm sure some of those are faster than Python, although probably verbose. Also, check out the record type in dotlisp.
Posted by Robert Sayre at Wed Feb 4 06:59:34 2004





You can subscribe to an RSS feed of the comments for this blog: RSS Feed for comments

Add a comment here:

You can use some HTML tags in the comment text:
To insert a URI, just type it -- no need to write an anchor tag.
Allowable html tags are: <a href>, <em>, <i>, <b>, <blockquote>, <br/>, <p>, <code>, <pre>, <cite>, <sub> and <sup>.

You can also use some Wiki style:
URI => [uri title]
<em> => _emphasized text_
<b> => *bold text*
Ordered list => consecutive lines starting spaces and an asterisk

Name:


E-mail:


URL:


Comment:


Remember my info?


twl JPG

About

Ted Leung FOAF Explorer

I work at the Open Source Applications Foundation (OSAF).
The opinions expressed here are entirely my own, not those of my employer.

Creative Commons License
This work is licensed under a Creative Commons License.

Now available!
Professional XML Development with Apache Tools : Xerces, Xalan, FOP, Cocoon, Axis, Xindice
Technorati Profile
PGP Key Fingerprint
My del.icio.us Bookmarks
My Flickr Photos


Syndicate
RSS 2.0 xml GIF
Comments (RSS 2.0) xml GIF
Atom 0.3 feed
Feedburner'ed RSS feed

< February 2004 >
SuMoTuWeThFrSa
1 2 3 4 5 6 7
8 91011121314
15161718192021
22232425262728
29      

Archives
2006
2005
2004
2003

Articles
Macintosh Tips and Tricks

Search
Lucene
Blogs nearby
geourl PNG

Categories
/ (1567)
  books/ (33)
  computers/ (62)
    hardware/ (15)
    internet/ (58)
      mail/ (11)
      microcontent/ (58)
      weblogs/ (174)
        pyblosxom/ (36)
      www/ (25)
    open_source/ (145)
      asf/ (53)
      osaf/ (32)
        chandler/ (35)
        cosmo/ (1)
    operating_systems/ (16)
      linux/ (9)
        debian/ (15)
        ubuntu/ (2)
      macosx/ (101)
        tips/ (25)
      windows_xp/ (4)
    programming/ (156)
      clr/ (1)
      dotnet/ (13)
      java/ (71)
        eclipse/ (22)
      lisp/ (34)
      python/ (86)
      smalltalk/ (4)
      xml/ (18)
    research/ (1)
    security/ (4)
    wireless/ (1)
  culture/ (10)
    film/ (8)
    music/ (6)
  education/ (13)
  family/ (17)
  gadgets/ (24)
  misc/ (47)
  people/ (18)
  photography/ (25)
    pictures/ (12)
  places/ (3)
    us/ (0)
      wa/ (2)
        bainbridge_island/ (17)
        seattle/ (13)
  skating/ (6)
  society/ (20)



[Valid RSS]

del.icio.us linkblog

www.flickr.com

Blogroll

java.blogs
Listed on BlogShares

Locations of visitors to this page
Where are visitors to this page?


pyblosxom GIF