Re-entrant Code Sucks
https://publicobject.com/2023/03/31/surprised-by-re-entrant-code/
Surprised by Re-entrant Code
Some of the trickiest bugs I’ve seen happened because a function unexpectedly occurred multiple times on the call stack. Re-entrant ListenersTo illustrate, consider a TextField widget that implements the listener pattern: class TextField { var listeners = mutableListOf<Listener>() var value: String = "" set(value) { val previous = field if (value