次のような暗黙のクラスがあるとします。
implicit class RichString(str: String) {
def sayHello(): String = s"Hello, ${str}!"
}
メソッド sayHello を String クラスで定義されているかのように使用できます。
"World".sayHello
scala コンパイラーはこれを静的呼び出しのようなものに最適化して、RichString オブジェクトを構築するオーバーヘッドを回避しますか?