I’m trying to work through the examples in this chapter but the playground is somewhat erratic in its behaviour. Sometimes a typo or partially completed line of code triggers an error message in the editor and then the playground hangs - the only way to get up and running again is to quit Xcode and run ./boostrap.sh (although it sometimes takes one or two attempts to clear any errors relating to missing source files).
I’ve got a feeling it’s related to introspection / reflection which Swift isn’t overly good at (I found Java a lot more reliable). I’m still a relatively inexperienced iOS developer and the stack trace is even more incomprehensible than normal!
Not all of the Playgrounds misbehave if that makes you feel any better. I’ve now completed the book and generally most of them work pretty well with the odd glitch resolved by running the bootstrap command again after closing Xcode.