[Vm-dev] I just did a terrible thing :-)
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Sat Sep 19 16:26:48 UTC 2020
If we want to avoid heart disease we can also use better constructors like
TVariableNode named: ... ;)
Le sam. 19 sept. 2020 à 17:41, Eliot Miranda <eliot.miranda at gmail.com> a
écrit :
>
> Hi Smalltalkers,
>
> I just made a Smalltalk := nil type blunder. I wrote:
>
> TVariableNode setName:
> (node selector = #maxVal
> ifTrue: ['MaxSmallInteger']
> ifFalse: ['MinSmallInteger'])
>
> and suddenly parse tree printing didn't work and TVariableNode was called
> MaxSmallInteger :-)
>
> Once I wrote
>
> TVariableNode new setName:
> (node selector = #maxVal
> ifTrue: ['MaxSmallInteger']
> ifFalse: ['MinSmallInteger'])
>
> normal service was resumed. Normally we don't shoot ourselves in the
> foot, but when we do we can sometimes repair the damage perfectly by
> evaluating TVariableNode setName: #TVariableNode ;-)
> _,,,^..^,,,_
> best, Eliot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20200919/1bb08148/attachment.html>
More information about the Vm-dev
mailing list