Skip to content

Releases: joesus/BottlesOfOOPSwift

Chapter 6

17 Feb 00:25
Compare
Choose a tag to compare
Handles six pack requirement

There were some compromises at the end

* was forced to use a protocol to simulate what you get for free in ruby with dynamic type
* was forced to add extension to string to get compiler to shut up and to complete “to_s” refactor
* wasn’t able to complete the refactor to have successor return BottleNumber instead of Int because swift can’t return an object OR an unrelated primitive and to put it in a protocol would have been more steps, and to put it in a struct and make it conform to interator protocol seems like overkill

Chapter 5

17 Feb 00:25
Compare
Choose a tag to compare
chapter5

cures primitive obsession

chapter4

15 Feb 20:46
Compare
Choose a tag to compare
refactors with flocking rules

chapter3

15 Feb 20:46
Compare
Choose a tag to compare
refactors out 2 case by introducing container abstraction

Chapters 1 and 2

15 Feb 20:44
Compare
Choose a tag to compare
chapter1and2

First chapter converted to the swift