Let's take a real-life case, from working with gee-kid on some code the last couple of weeks.
items = getTheItems()
for(item in items) {
doSomething(item)
doDifferentBasedOnDataset(item)
doSOmething(item)
}
Here's the first round text for reference.
threadreaderapp.com/thread/1258005…
2) Put a field of type Dataset into Analyzer.
4) Add three concrete implementations of Dataset, each with custom bodies for the two methods.
6) change the calls in Analyzer to let the dataset field do getItems() and doDifferentBasedOnDataset(item).
Subscribe now!
geepawhill.org