3 ms·
I'm surprised modern SmallTalks (Pharo, Squeak) haven't yet explored optional types. (Yes, I know about StrongTalk. :-) )
by dharmatech 7y ago
I'm surprised modern SmallTalks (Pharo, Squeak) haven't yet explored optional types. (Yes, I know about StrongTalk. :-) )
- scroot 7y agoThere are a couple of projects in the works that take an interesting approach to this. Because the image/VM is always running you can essentially "turn on" a checker that will note which classes of objects have been sent as message arguments to some method. After a while you have more or less a list of "types" that a given method understands because of what the system has experienced. These can then be used for type hints in the IDE. This approach is doubly interesting if you work with tests, because simply running a test suite you think is fairly comprehensive will result in a pretty good set of types.
- isr 7y agoYou may (or may not?) find this interesting, by one of the cuis-smalltalk maintainers: [LiveTyping](https://github.com/hernanwilkinson/LiveTyping https://github.com/hernanwilkinson/LiveTyping) is a project which keeps track of types (and shows them to you) as they become known to the vm. PS: cuis smalltalk = a less-bloaty "distribution" of squeak (I say "distribution" rather than fork, as that more closely captures the spirit. Its just a thorough culling of the core classes, and stripping out of extraneous stuff - all running on the same squeak vm)