In v2 default interfaces will be created for each object (see #10). So you access object.interface_name to get a reference.
Currently in v1, the public interface methods are rendered like:
void interface_name_foo(interface * reference)
So you need to pass pointer to the interface.
This could be changed to passing a copy of the reference:
void interface_name_foo(interface reference)
PROS:
- Cleaner API
- No accidental modification of the reference in the implementation
CONT:
- Instead of passing one pointer-sized field, the compiler has to pass a struct containing two pointer-sized fields (object and methodtable)
Decision is not finally...
In v2 default interfaces will be created for each object (see #10). So you access object.interface_name to get a reference.
Currently in v1, the public interface methods are rendered like:
void interface_name_foo(interface * reference)So you need to pass pointer to the interface.
This could be changed to passing a copy of the reference:
void interface_name_foo(interface reference)
PROS:
CONT:
Decision is not finally...