dougblack/sleepy — pull request #5 by logannc (2014-01-26 17:49:14+00:00)
Title: Different Interfaces

Split the Resource Interface into interfaces for each method. Simplifies declaration at the price of a bit of type safety. You could pass in the number 4 as a resource. It would 405 everytime, but you could do it.

Originally I had thought that this would be clearly superior, but I hadn't anticipated the snag with the resource as the function argument. Of course, now you can't forget to declare that a method isn't supported, but I guess that would have raised a compile time error about it not being a Resource.

I guess it's ultimately up to whether you think the simplified declaration is worth it.

Good day, sah!