Ted Leung on the air
Ted Leung on the air: Open Source, Java, Python, and ...
Sun, 04 May 2003
This blog is turning into comp.lang.dylan
Sam Gentile's blog had a reference to a C/C++ Users' Journal article on enforcements in C++, which is a way of using templates to create assert like constructs. For the example that they show, you end up needing two versions, one for const and non-const objects. Then the authors decide to parameterize the enforcer class a bit more and end up with a template class that has a nested templatized operator. The creation of enforcers is so complicate that the authors define a macro which calls another macro and instantiates the template. Ouch. This makes Lisp macros look easy in comparison. That's 2 language mechanisms (template classes and macros -- three if you count the nexted templatized operator) in order to do what one mechanism, macros, can do in Lisp or Dylan.

Next up, a pair of articles from Carlos: In the first, he cites what he sees as disadvantages of dynamically typed languages:

The pros I perceive is not what most would argue. It's actually based on my experience using the Visualage and Eclipse environments. The pros are that it's easier to navigate and search the code base. See the absence of type information makes it difficult to find the dependencies between code. Ask any smalltalker their experience of trying to reduce the size of the smalltalk image, it's an extremely painful process. Just because you're liberated today from type information, doesn't mean that it's not going to strike you back tommorrow.

The question you've got to ask is, should I sacrifice the code completion, quick-fix, search, etc. for a little fewer keystrokes?

I think that the ability to build an intelligent development environment and the ability to build minimal images (for languages that have them) are orthogonal. On the building of intelligent environments, we need only point out that Visual Age and Eclipse have their roots in Smalltalk environments. The environment that I'm using for Python, WingIDE can do code completion and reasonable searching. I think it's a matter of work to some of the features like quick-fix. Here are some screenshots of Apple's Dylan environment from 1994, that give you an idea of the kinds of things that can be done. There's an interesting article about this in CACM.

As far as reducing image, that's possible to do as well. The Dylan folks found an innovative solution to the image problem -- known as the tree-shaking problem in the Lisp community. Instead of starting with a whole world image and trying to strip it down, they started with an empty world and added only what was needed. A Dylan app that was under development ran in a debugger nub that only contained the code needed to run that app. As the app grew, code was added to the code in the nub. When it came time to ship a standalong application, you cut the tether to the nub (an IPC connection) and what was in the nub was your application.

The second of Carlo's posts contains questions:

What if you could remove type information from a static typed language?

What if you could annotate a dynamic language with type information?

Shouldn't languages have more than one mode?

If static type checking is just one kind of analysis, should we not be able to turn it off and on?

If I knew the type of an object is my code, should I have the capability to tell the compiler what type it is?

If tests were so important, shouldn't I be able to ask the compiler to generate some of these tests ?

The right language should not be a choice between static and dynamic checking, it should give you that choice.

The right language allows me to choose how much static analysis I really need.

The right language allows me to give hints to make that analysis possible.

The right language makes creating tests easier.

I'm aware of two languages (at least) that allow you to add type declarations to parts of a program as needed: Common Lisp and Dylan. I'm sure that there are probably more, but I know for sure that this can be done in those two languages.
[00:46] | [computers/programming/lisp] | # | TB | F | G | 1 Comments | Other blogs commenting on this post
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

< May 2003 >
SuMoTuWeThFrSa
     1 2 3
4 5 6 7 8 910
11121314151617
18192021222324
25262728293031

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