On 2016-02-22 10:56, Sönke Ludwig wrote:

The motivation is to ensure that the client and server implementations
talk over the same interface and to make it more or less impossible to
accidentally misuse it. But this issue has been brought up before and a
possible solution is to generate the interface from the class definition
in cases where it is just overhead. It would then look something like this:

class MyRestAPI : AutoInterface!MyRestInterface {
   ...
}

I would prefer that interface is completely optional. I have the feeling
that it's very common to provide an API without a client. Or where the
client and the server are not written in the same language. That's at
least the use case I have.

It would be great if it worked with structs as well. I have not looked
at the implementation in detail to say if this is feasible.

/Jacob Carlborg