[Vm-dev] I just did a terrible thing :-)
Jakob Reschke
forums.jakob at resfarm.de
Sun Sep 20 14:45:18 UTC 2020
Am Sa., 19. Sept. 2020 um 19:40 Uhr schrieb tim Rowledge <tim at rowledge.org>:
>
> > On 2020-09-19, at 8:40 AM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> >
> > 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 :-)
>
> This is just one of the reasons I'd really like properly done private methods; if the Class>setName: method were private you wouldn't have been able to do this. And a lot of other people (ie almost certainly absolutely every person the ever wrote any Smalltalk) wouldn't make a whole raft of mistakes.
>
...or more value objects that are immutable.
More information about the Vm-dev
mailing list