extension function in Kotlin

Kotlin allows you to add your own methods to existing classes, even to built-in types. They are neatly scoped to whatever package they're defined in, and don't hijack the type for the entirety of the code in your program. The latter is what happens when you add a new method to a built-in class dynamically in Ruby, and as far as I know, it's a constant source of bad surprises.
It doesn't require any special magic. Just keep in mind that T.func() is not really different from func(T), only the name of the first parameter is going to be this, and it's going to be available implicitly.
This, I think, is actually a big deal, becasue looser coupling between types and functions operating on them pushes you away from building rigid heirarchies. And by now I believe most people have realized that inheritance doesn't scale. So these days the only real value in having T.func() over func(T) is the ability to compose functions in the natural direction:
```
data.prepare().process().finalize()
```
… as opposed to
```
finalize(process(prepare(data)))
```