From: Arno P. <ar...@pu...> - 2010-09-12 10:33:23
|
right now we map Objective-C protocols to Java interfaces, except if there are optional methods in the protocol. In that case we map it to an abstract class. Using Java interfaces and being able to make use of multiple inheritance leads to better designs, IMHO. Of course you can mimic it with abstract classes only but the resulting design is not as 'natural'. As far as I can tell, the majority of the Cocoa protocols do not have optional methods, so making abstract base classes the default seems like a drastic decision. As a compromise, since you have mentioned a 'support' package that houses non-standard API, it would be possible to do both: Java interfaces and abstract base classes. This way the developer could choose which to use. There would be some redundancy, but if would offer developers a choice. Thoughts, anyone? Arno On 9/11/10 1:51 PM, Panayotis Katsaloulis wrote: > On 11 Σεπ 2010, at 5:44 μ.μ., Leo Izen wrote: > >> Java doesn't support multiple inheritance the way C++ does. This means that If you want your class to extend multiple types, you have to use interfaces. > > I know, I am not talking about general Java programming, but the specific implementation of ObjC library under Java. > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |