4 ms·
I can do all of those things in Smalltalk, which is dynamically typed; these things are not byproducts of static typing, they're simply byproducts of mature too
by gnaritas 9y ago
I can do all of those things in Smalltalk, which is dynamically typed; these things are not byproducts of static typing, they're simply byproducts of mature tools. So no, these are not arguments in favor of static types.
- igouy 9y ago>> finding all references to a function << Yes, you can find all references to a method in Smalltalk -- but those references are not separated-out from all the references to other methods that happen to have the same method name but are defined on a different class. With type information for the receiver and method arguments, we can find just the references we're looking for.
- lispm 9y agoI can ask my Lisp IDE to find callers for methods based on the sub/class of arguments.
- igouy 9y agoDoes it work better if you use type-specifiers in your code :-)
- KingMob 9y agoI can't speak to Smalltalk, but any namespaced Lisp system can figure out what references what. The key is that the searches happen through the REPL, not grep/ag. So if I tell CIDER to find all instances of a Clojure symbol, it can use the namespace to avoid false positives.
- gnaritas 9y agoWhich is why Smalltalk's refactoring browser has a manual intervention step to allow you to see what it proposes to do, and remove any steps you don't agree with, as well as the ability to scope your refactorings to a package or class to limit the scope to more relevant data. Either way, it's sufficient to get 99% of the benefits of automated refactorings without the 100% guarantee static typing provides; good enough for me. Automated refactoring was invented in Smalltalk, claiming it's a benefit only static typing provides is to not know history.
- igouy 9y ago> Automated refactoring was invented in Smalltalk, claiming it's a benefit only static typing provides is to not know history. History: In Bill Opdyke's thesis work, the tooling was written for C++ and written in CLOS. http://www.laputan.org/pub/papers/opdyke-thesis.pdf http://www.laputan.org/pub/papers/opdyke-thesis.pdf
- gnaritas 9y agoRalph Johnson, a prominent Smalltalk'er, was advisor on that paper and was the creator of the first Smalltalk refactoring browser and that paper is littered with references to how things are done in Smalltalk. I was unaware a C++ was involved, but I still think Smalltalk had the first commercial refactoring browser. A research paper is not a product, however, thanks for the ref.
- igouy 9y agoDo you think having "the first commercial refactoring browser" is the same as "[a]utomated refactoring was invented in Smalltalk" ;-) Incidentally, what's your source for "Ralph Johnson… was the creator of the first Smalltalk refactoring browser" ?
- gnaritas 9y agoDon't be a douche, obviously I don't think it's the same hence my comment. And I'm willing to bet, same as you, my source was Google to verify my memory of something I read long ago.