3 ms·
> especially hard for beginner students Perhaps you don't know that 50 years ago Smalltalk was being taught to middle school and high school students? > Nothi
by igouy 3y ago
> especially hard for beginner students
Perhaps you don't know that 50 years ago Smalltalk was being taught to middle school and high school students?
> Nothing so simple exists in smalltalk
Have you actually used Smalltalk?
----
`I will always remember a debug emergency call I received during one of our student classes. A girl was experimenting with numbers in Smalltalk-80, and suddenly her system froze when she tried to reframe a window. Although the UI was unresponsive, the "emergency evaluator" window was still operating so I was able to take a look at what had happened. Her window was trying to display itself, but was encountering an error because BitBlt, responsible for painting the border, had a width that was. . . wait a minute. . . a Fraction? We did not even have fractions in the student system, but she said, "Oh yes, I added a Fraction class".
Interestingly, BitBlt was written to be resilient, in that if it received a non-integer argument, it would call itself again after sending the message asInteger to that argument. However, her fractions did not have such a method, so the debugger had stopped at that point and was not even able to show the problem because of another such infraction (er, sorry). I asked whether she had a conversion to integer and she replied no, but that her fractions did have a makeFloat message. We talked about the problem, and I got her to suggest defining
Fraction understands: 'asInteger' as: '↑ self makeFloat asInteger'
We were able to type this into the emergency evaluator, at which point the debugger miraculously displayed itself, the window she had tried to reframe reappeared, and everything in the system seemed to work again. Probably hundreds of methods in the system were now operating just fine with rectangles whose coordinates were instances of a student’s newly defined Fraction class. This illustrates the astounding ability of message-sending systems to absorb unanticipated constructions.`
Daniel Ingalls "The Evolution of Smalltalk" 85:63
Proc. ACM Program. Lang., Vol. 4, No. HOPL, Article 85. Publication date: June 2020
https://dl.acm.org/doi/pdf/10.1145/3386335 https://dl.acm.org/doi/pdf/10.1145/3386335
- theamk 3y agoI don't think "smalltalk was taught 50 years ago" is a good argument. When I was a kid we used MSX machines with no storage.. your program would be just gone at the end of the lesson (or if you messed your POKE's). If you wanted to save, you copied code to your notebook. Were we able to get things done as middle-school students? Yes. Would I recommend this environment to anyone else today? No. And yes, I get this, if you have on-call expert for student classes (preferably principal architect of the system), then you can use Smalltalk. But I've never seen "on-call experts" at any time during the university... the closest thing is sometimes there are TAs during labs, but those TAs are just slightly older students. What would that girl do if Daniel were not around? Would she have to reset the environment and lose all of her work? (For comparison, later on we got PCs with MS-DOS. I've crashed those machines so many times with all sorts of crazy or stupid code.. and I never needed anyone's assistance to recover - hit RESET, wait for machine to reboot, reopen your files..)
- igouy 3y agoHave you actually used Smalltalk? > Would she have to reset the environment and lose all of her work? Why would she lose her work? https://cuis-smalltalk.github.io/TheCuisBook/The-Change-Log.html https://cuis-smalltalk.github.io/TheCuisBook/The-Change-Log....