mootools/Base — Issue #34: Class.hasImplemented(class)
Author: arian
Created: 2011-10-31 12:41:51+00:00
State: open

In other OOP languages, to see if a Class has implemented a interface, you could do:

``` java
if (object instanceof SomeInterface){

}
```

In JavaScript and MooTools, however, this doesn't work the same if we implement classes through the `Implements` mutator.
What if we would have some list tracking all the implemented classes and add a API like:

``` js
if (object.hasImplemented(Store)){

}
```

That way you know it has certain methods that can be used.

It's just a random thought, so +1 or -1?