Manuel Meyer
Oct 16, 2024

--

You have a very keen observer's eye.

In earlier articles I actually used the term "Modularised Command Interpreter" to describe the architecture.

I use the replayability to do something I call "Petry Dish Testing", where I swap out the UI and send commands after random intervals to simulate days, weeks or month of user interaction over a weekend, monitoring the memory consumption.

I also overload the alter method to take an array and to take a variadic list in my projects. In the article I left them out to reduce the codes a bit, but here they are:

func alter(_ cs:[Change]) -> Self { cs.reduce(self) { $0.alter($1) } }

and

func alter(_ cs:Change...) -> Self { cs.reduce(self) { $0.alter($1) } }

--

--

Manuel Meyer
Manuel Meyer

Written by Manuel Meyer

Freelance Software Developer and Code Strategist.

No responses yet