I wasn't looking to implement meathods in the interface, I was looking to have a default class that implements the interface that would be created if you called `new Interface();`  I don't think this is possible. and now that I think about it I think that it is for a good reason.<br>

<br><div class="gmail_quote">On Fri, Feb 17, 2012 at 12:21 PM, Jacob Carlborg <span dir="ltr"><<a href="mailto:doob@me.com">doob@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On 2012-02-17 18:04, Steven Schveighoffer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, 15 Feb 2012 22:01:51 -0500, Kevin <<a href="mailto:kevincox.ca@gmail.com" target="_blank">kevincox.ca@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I was implementing a framework and I found that I wanted two things.<br>
- A strong set of interfaces so that I can get what I want from a<br>
variety of sources.<br>
- Some basic implementations of these interfaces.<br>
<br>
For example, say I was writing a database class. I could either name<br>
the interface Database and call the class DatabaseImplementation or<br>
something but that is ugly. If I call the interface IDatabase, the<br>
Database class looks nice but I need to convince users to write<br>
functions that take IDatabases not Databases.<br>
<br>
I was wondering if there was any way to implement a default<br>
implementation. This way, I could create my Database interface and<br>
classes could implement that but if you called `new Database()` you<br>
would still get a basic database.<br>
</blockquote>
<br>
Aside from what has been said already, if you wish to have methods that<br>
are not static defined in the interface, final methods currently work:<br>
<br>
interface I<br>
{<br>
void foo();<br>
final void callFoo() {writeln("about to call foo"); foo(); writeln("ok,<br>
I called foo");}<br>
}<br>
<br>
This isn't exactly a "default implementation", since you can't override it.<br>
</blockquote>
<br></div>
But you could have one final method, the implementation and one virtual, the one you would override. It's an idea, I don't know if it's a good one.<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-- <br>
/Jacob Carlborg<br>
</font></span></blockquote></div><br>