I finished a big rewrite/solidification tonight and after some initial on device testing it looks like the most robust iteration yet. A distillation of about 6 different approaches over the past few weeks. #prosedev
I'm quite pleased with the solution. In previous iterations trying to adhere to the DRY principle got the better of me. Now that I have a solution it's easier to see where I can refactor things into shared code paths.
Swift Playgrounds continues to be very useful, especially in conjunction with the Magic Keyboard. Some ergonomic flaws have become evident but for the first version of its kind, it's surprisingly light and functional.
I've been confident in my solutions before but since eliminating some framework warnings last week my goal was to silence the rest. I've never accomplished that until tonight.
So naturally the pessimist in me is still watching the console... #prosedev
Confidence was short lived. I'm still confident this is the correct direction though. The good thing about state machines is it's easy to adjust each case individually
I solved the DRY problem from earlier by creating a custom Sequence type. It means I can use the calling scope, break/continue keywords, and tuple deconstruction. Plus, any iteration state is written once and hidden by the for-in loop.