Abstract classes and Interfaces
Monkey Forums/Monkey Programming/Abstract classes and Interfaces
| ||
In my opinion, interfaces should not need to be implemented in an abstract class. They should simply be inherited as an abstract method. As it stands, you need to explicitly define the interface method in the abstract class (even if you only define the method as abstract).Interface Foo Method SomeMethod:Void() End Class Bar Implements Foo Abstract End Class Test Extends Bar Method SomeMethod:Void() ' method contents End End Function Main:Int() Local bar:Bar = New Test bar.SomeMethod() ' Error : Identifier 'SomeMethod' not found. Return 0 End |
| ||
Hi, I quite like this idea, but unfortunately it looks like C# might not (see 2nd last post): http://stackoverflow.com/questions/197893/why-an-abstract-class-implementing-an-interface-can-miss-the-declaration-impleme Will have a look into it though. |
| ||
Surely you could make trans silently add them? |
| ||
Surely Don't call Mark, Shirley! ;) |
| ||
I knew that was coming... |
| ||
Hi, Yes, but it's gone from being a 5 minute job to a semi-major one! Anyway, moving this to programming for now...will think about it. |