Animorphic ST (Strongtalk) released!

Gilad Bracha gilad at bracha.org
Thu Jul 25 14:56:38 UTC 2002


At 06:31 AM 7/25/2002, you wrote:

>And, as I've said before, I think the typing should be optional for both
>the writer and the reader (meaning that any attempt to do this in Squeak
>should take into consideration that even though the author of a method
>may have included type annotations, the reader may not want to see
>them).

There is a crude way to achieve a similar effect right now. Open an 
inspector on ProgrammingEnvironment and within it evaluate

TypeExpressionPainter paint: Paint white
which will make the types white on white in the text. Similarly,
TypeSignaturePainter paint: Paint backgroundGray
will make them gray on gray in the browser itself.

Of course, this isn't something I recommend - the text is still there, but 
invisible, which could be quite confusing, lead to errors etc. One could 
arrange for the browsers to strip out type information on demand (though 
care must be taken not to lose this information upon edits) - it isn't too 
hard.

We had considered the issue of completely stripping out type information in 
the context of filing out code to other Smalltalks.  Because the type 
system is optional, this isn't very hard or fundamental.

A general solution for this is UI issue is valuable in any editing/document 
system. One wants to maintain multiple layers of annotations, linked to 
specific points in the main text (or other layers), but easily separable so 
they can be hidden or dropped. Examples:

1. The main text is a scientific paper and the annotations are reviewer 
comments.
2. The main text is the Smalltalk source and the annotations are for types.
3. (Generalization of (2)) The main text is source code, but we have 
annotations for multiple static analysis systems, such as effect systems, 
or verification tools similar to ESC/Java, each in its own "layer".
(Yes, I know you don't care for Java, but the ideas apply to Smalltalk as well,
see http://research.compaq.com/SRC/esc/) etc.

You should be able to support all this nicely in an environment like 
Squeak, right?


Cheers,  Gilad

*********************************************
Gilad Bracha
Computational Theologist
Sun Java Software
http://java.sun.com/people/gbracha/




More information about the Squeak-dev mailing list