5 ms·
> I'm afraid you don't understand Smalltalk environment in full. I'm afraid you don't understand the difference between a statically and dynamically typed lang
by hota_mazi 9y ago
> I'm afraid you don't understand Smalltalk environment in full.
I'm afraid you don't understand the difference between a statically and dynamically typed language.
I am well familiar with Smalltalk and its image system, I was using it on Sparc and NeXt stations more than twenty years ago.
What you don't understand is that the absence of type annotations (Smalltalk) makes it impossible for automatic refactorings to execute safely. It's mathematically impossible.
Smalltalk's refactoring browser required a lot of human supervision to perform its refactorings. You could turn the prompts off (maybe that's what you did) so you'll have the illusion of an automatic refactoring, but the code you get in the end is unsafe and might be different from the one you started with.
You don't have this problem with a statically typed language, where the automatic refactorings are guaranteed safe.
> Don't worry, though - the misconceptions you hold are very popular and it's not your fault for believing them
Please stop the patronizing tone, I'm pretty sure I know more about this subject than you do, having worked in this field for 40+ years.
You just don't know what you don't know. It's okay, but just don't act superior to random people on the Internet or you'll just look like a fool.
- klibertp 9y agoEDIT: rewrote the comment > What you don't understand is that the absence of type annotations (Smalltalk) makes it impossible for automatic refactorings to execute safely. It's mathematically impossible. What you don't understand - I write this jokingly and let's not escalate this further - is that there are more ways of getting the type information than explicit annotations in the source code. But, thinking about this, I'm inclined to agree that there are, in principle, fewer safe refactorings possible in a language which relies solely on these "other ways". I of course completely disagree that there are no such refactorings at all, and - additionally - there is no reason that Smalltalk could not allow for some annotations. 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. > but the code you get in the end is unsafe and might be different from the one you started with. > You don't have this problem with a statically typed language, where the automatic refactorings are guaranteed safe. Are you sure that all the refactorings in a statically typed language are safe? Even if the type system is unsound - which it almost always is? I don't believe it to be true, but I can be persuaded otherwise if you present a proof. > Please stop the patronizing tone Then please stop stating unconditional superiority of static type systems. > You just don't know what you don't know. Indeed. That's normal, though. Still, I'm learning. Please help me in this and provide arguments backed by facts instead of writing in broad generalizations.
- 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.
- hota_mazi 9y ago