| ... Ousterhout
| is right on this point at least: strong, static typing
| does often mean cutting back on nifty syntactic tricks that
| are played with untyped languages
I don't think it is the strong typing that does it, it is just the lack of
abstraction. Strong typing, if rich enough, can even _help_ you making
better abstractions in a language.
Ousterhout is absolutely right: we need languages that provide better glue
than the languages he calls `system languages'. But that doesn't mean that
we have to give up strong typing!
| ... At least until the language designers
| add some features (like labelled optional arguments) to their
What do you think of type classes? The system `TkGofer' uses these, to do
a pretty good job combining the conciseness of Tcl with the strong typing
and expressiveness of functional languages (in this case Gofer).
An example of an expression in TkGofer is:
b <- button [ text "A button", command (puts "hello") ] w
This would create a button in window w with the specified options and puts
the result in the variable b. (This is a disadvantage of Tcl -- explicit
naming of widgets).
Strong typing is for example _used_ for configurations. A widget that has
no command, can't get a `command' configuration. For example:
l <- label [ text "A label", command foo ] w
Will give a _static_ type error:
ERROR (line 7):
*** Required instance : HasCommand Label
Because labels don't have commands. But _both_ widgets can get the `text'
configuration, because they both have text. TkGofer use type classes to do
My experience with TkGofer is that it is even more concise than Tcl, _due_
to the expressiveness of strong typing, type classes, and functional
programming in general.
TkGofer is one of the many examples that show how we can use strongly
typed (functional) languages as glue to provide interfaces to untyped
* Vullinghs, T., `TkGofer homepage', URL:
* Claessen, K., Vullinghs, T. and Meijer, E., `Structuring Graphical
Paradigms in TkGofer', to appear at the ICFP '97, URL:
| Koen Claessen, firstname.lastname@example.org. |
| http://www.cse.ogi.edu/~kcclaess/ |
| Visiting student at OGI, Portland, Oregon, USA. |