In objective-c, I would use optional protocol methods to provide customization points and then check to see if it was implemented:
if ([delegate respondsToSelector:"optionalMethod"]){
//Use optionalMethod to do customized thing
}else{
//Do a highly optimized thing!
}
This allowed me to have a highly optimized path, while still allowing customization...
In Swift, I am loving protocol extensions, but I can't figure out how to provide an optimized path for objects/structs/enums which don't override a particular customization point. Is there anyway to (efficiently) test if a customization point has been overriden?