Wednesday, April 27, 2005

Think Dynamic

I overheard this on the ruby-talk mailing list from Lothar Scholz:
We are using a different type of language but too many people still
think in static terms. A completition popup can't look the same as in
java/C++ and the data gathering phase can't work with static source
code analysis alone. I'm not a mac guru, but follow apple and

"Think different"

This is in response to the popular "but, dynamic languages can't have auto-completion" baloney argument. First off, Squeak and VisualWorks both have auto-completion that works very well. I do tend to use it, but not very often. I certainly don't use it as much as I do when I am programming in java. Dynamic languages don't require as much cognitive friction and things just seem to flow. Auto-completion just isn't an issue. I simply loved Lother's response because it typifies the thought divide between dynamic and static language users. We "think different" because our tools allow us to create in more grandiose ways and allows access to better abstractions.


Andrés said...

Um... I don't type that much Smalltalk code when I do. That's the point of writing proper code. Therefore, I tend to feel autocompletion is largely a problem created by the need to write too much.

Now if I could get a "suggested literature" popup that could select relevant pieces of the code to read... something like "Google Senders"...

Considered Opinion said...

I have not seen auto completion at work in Smalltalk, so I do not know what it is capable of.

In Boo, a language I am looking at at the moment, I can type such things

thing = Thing("an argument")

and at the dot I get a list of the methods applicable to a Thing, together with allowable arguments (the first line is creating a new instance).

So in Smalltalk this would be:

| thing |
thing := Thing new.

and following the space (or maybe some keystroke sequence) I get similar?

(In C# it is a little more verbose, but the same effect.)

Unknown said...

Yes, in Squeak using the package ECompletion, I simply do ctrl-space and it gives me a set of possible methods that I can select from. It works a lot like Eclipse's auto-completion for java.