3 ms·
> that there are more ways of getting the type information than explicit annotations in the source code The only way that's been studied is running the code an
by hota_mazi 9y ago
> that there are more ways of getting the type information than explicit annotations in the source code
The only way that's been studied is running the code and inferring types based on the runtime behavior of the program.
This is still extremely error prone since you never have a guarantee that these runes are exhaustive enough to present the entire type spectrum that certain objects can receive. Besides, it's also obviously completely impractical (and defeats the purpose) to actually have to run your code before you can gain some type information about it.
No, there is really only one way to acquire the type information necessary for safe automatic refactorings, and it's to have type annotations in your source.
> Have you seen NewSpeak, a Smalltalk dialect by Gilad Bracha? I admit I was thinking more about it and similar systems than about pure Smalltalk of the '80s. Sorry about the confusion.
Yes, I followed NewSpeak when Gilad was working on it but I had little interest in it since Gilad perservered in the dynamically typed approach that is flawed on so many levels. StrongTalk was a more interesting experiment, in my opinion.
> I of course completely disagree that there are no such refactorings at all
There are very few of them, such as renaming a local variable. That's pretty much it. Anything else that goes beyond a very tiny lexical scope is impossible to automate safely.
> Then please stop stating unconditional superiority of static type systems.
It's pretty much a fact today. A decade ago, you could have argued that dynamically typed languages let you prototype faster and are less verbose than statically typed languages.
With today's generation of statically typed languages, these two advantages no longer apply and there is really no good reason to start a large project with a dynamically typed language.
- lispm 9y ago> With today's generation of statically typed languages, these two advantages no longer apply and there is really no good reason to start a large project with a dynamically typed language. There is lack of evidence for it, especially given that 'today's generation of statically typed languages' is mostly unused and there is very little practical experience. Most of the industry hasn't heard about it and doesn't use it.