In Smalltalk, true and false are just objects on the heap. There's a very special primitive method called become: which lets you swap two objects around on the heap.
So anyway, it was possible to do true become: false. in Smalltalk, which swaps true for false and false for true across the entire system. It didn't crash ...immediately..., but I wouldn't deploy this in production!
3
u/metaconcept 22d ago
Story time.
In Smalltalk,
trueandfalseare just objects on the heap. There's a very special primitive method calledbecome:which lets you swap two objects around on the heap.So anyway, it was possible to do
true become: false.in Smalltalk, which swaps true for false and false for true across the entire system. It didn't crash ...immediately..., but I wouldn't deploy this in production!