Path: utzoo!utgpu!watserv1!watmath!att!att!emory!wuarchive!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!johnson From: johnson@m.cs.uiuc.edu Newsgroups: comp.object Subject: Typed Smalltalk type system Message-ID: <77500061@m.cs.uiuc.edu> Date: 29 Oct 90 13:58:00 GMT Lines: 28 Nf-ID: #N:m.cs.uiuc.edu:77500061:000:1435 Nf-From: m.cs.uiuc.edu!johnson Oct 29 07:58:00 1990 Craig Chambers made a couple of comments about Typed Smalltalk to which I would like to respond. Typed Smalltalk can handle both of the Smalltalk features that he mentioned, which are perform: and OrderedCollection. The solution for perform: is fine theoretically, though we have yet to see how well it works in practice. The solution for OrderedCollection works well in practice, though it relies on a hack. As Craig said, all static type systems are conservative. Whether this is a problem or not depends on how conservative they are. Most of the type system have some loop-hole, such as casts in C and C++. Loop-holes do not cause a problem as long as they are almost never used. One of the advantages of C++ over C is that casts are much more infrequent. We use a loop-hole in the type system to type-check OrderedCollection in Smalltalk. To the best of my knowledge, the only other place in the Smalltalk image that needs to use the loop-hole is the debugger, but we haven't type-checked the whole image yet, so we really don't know for sure. We are not particularly happy with having to use a loop-hole, and are working on a couple of extensions to the type system that would make it unnecessary. Since type systems are always conservative, I suppose a loop-hole facility is always necessary, but I will be unhappy with any particular use of the facility. Ralph Johnson -- University of Illinois at Urbana-Champaign