Types of interfaces ------------------- Explicit interfaces: * Used in: Java, C#, ... * Compatibility: Same interface needs to be implemented. Implicit interfaces: * Used in: Go * Compatibility: All declared method names/paramas need to match Duck typing: * Used in: Python * Compatibility: All used method names/params need to match Decoupled interfaces via function pointers: * Used in: C * Compatibility: Methods can be mixed & matched, as long as types match Ideas ----- Make it possible to define a "translation" from a class to an interface? The translation could go either into a class or separately. Example: Openable.slul: interface # Must come first in the source file func open bool keep_open end Box.slul: implements Openable func open bool keep_open code ... end Bottle.slul: func pop bool leave_cap_off code ... end LockedDoor.slul: func open Key key bool leave_open code ... end UseInterfaces.slul: func test code open_thing box # How to solve these two? open_thing bottle open_thing locked_door end