Hello internals!

Since «traits» are often an indicator of not very good code and many may not 
use them quite correctly, for example, as helpers, I suggest adding support for 
the `expects` keyword to indicate that the trait is part of the code 
decomposition taking into account ISP.

For example:
```
// Definition

trait LoggerTrait expects LoggerInterface
{
    // ...
}

// Usage

class MyService
{
    use LoggerTrait; // Fatal Error: Class MyService expects LoggerInterface to 
be implemented
}

class MyService2 implements LoggerInterface
{
    use LoggerTrait; // OK
}
```

How relevant do you think this idea/proposal is? And what possible problems or 
solutions will this entail in the future?
 
--
Kirill Nesmeyanov

Reply via email to