trait Thingable {
  def thing: String
}

class Delegator {
  var delegate: Thingable = _

  def operation: String = if (delegate == null) "default implementation"
  else delegate.thing
}

class Delegate extends Thingable {
  override def thing = "delegate implementation"
}