Typed Systems, Type Inference, etc
Dan Ingalls
Dan at SqueakLand.org
Sun Jul 21 15:49:14 UTC 2002
>How about using signature revealing variable-names as Panu Viljamaa suggests?
>See http://members.fcc.net/panu/SmalltalkTypes.htm .
>
>I think it's small and integrates well, though lots of temps/ arguments
>would have to be renamed.
I'm opposed to this approach.
A variable name is a comment, and I say it should be used to indicate role, as in 'total', 'direction', 'methodNames', etc.
The introduction of type information to variable names has always been, to me, simply an indication that Smalltalk programmers *want* to offer and to see type information.
My assumption from the beginning has been that all code browsers would have a button to hide or show type annotations, just as one can now choose alternate syntax, code coloring, etc.
I like the statement...
The eventual goal of SmalltalkTypes is a tool that extracts
the type signatures from the source-code into a hypertext
"contract" -document, or into the Smalltalk browser directly
(E.g., "browse argument types of this method")
...but let's just do it right from the start, and not mix comments of role (why) with comments of type or protocol (what).
- Dan
More information about the Squeak-dev
mailing list
|