TJF wrote:The idea to create OOP style wrappers for FB is not new. In the header creator GirToBac I implemented such a code generator, but stopped development because an important feature is missing in FB syntax in order to extend a new class from multiple bases@CoderJeffCode: Select all
TYPE D EXTENDS A, B, C
Is there any chance to implement this new feature in FB in near future?
PS
I tested a workaround by chaining up multiple intermediate TYPEs, but found out that the generated code is too hard to understand/maintain. So I decided to wait until multiple extension is implemented in FB.
After reading these posts I'm really confused. What are we currently have (or not have)? What are we going to do?fxm wrote:I think that multiple inheritance will never be implemented in FreeBASIC, on the other hand, I am impatiently awaiting "IMPLEMENTS".
todo.txt:Code: Select all
- INTERFACE ... END INTERFACE - structs extending OBJECT, not allowing any fields, only methods - all methods automatically are ABSTRACT interface A declare [abstract] sub bar( ) end interface - IMPLEMENTS: type Child [extends Parent] [implements A, B, C] or allow just one interface? type Child extends A - multiple interfaces comes down to multiple inheritance (too hard?)