Sean P. DeNigris wrote on Sun, 17 Sep 2017 06:44:35 -0700 (MST)
Ralph Johnson wrote
Yes, when the compiler sees exp or: [ ... ] then it assumes that "exp" is a boolean-valued expression and generates code that fails if it isn't.
I remember the pain of tripping over these little "everything is a message send to an object*" sins as a new Smalltalker. I wonder now, with the incredible speed of Cog, Spur, Sista, etc., if these devil's bargains from prior decades are still necessary. It would be psychologically satisfying (and nice for newbies) to remove the asterisk from the principle above.
That was one of the changes between Self 1.0 and 2.0. The first version had a list of selectors it did special tricks for and it was annoying for programmers to have two code fragments that looked very similar to each other perform very differently. When Craig Chambers did the second generation compiler he noticed that he could handle all cases uniformly. The same should apply to Cog and Sista. Eliminating such tricks would hurt the interpreter, however.
-- Jecel