Currently we have two interfaces to represent objects in Goby. One is Object which represents any internal objects in the vm. The other one is BaseObject, which represents objects that can be accessed in Goby, like String, Integer.
And these two interface is sort of duplicated, their only difference is that BaseObject requires structs to have returnClass() method. This makes method and error can't be BaseObject, which means if we make these two structs have class then we can remove one of the interface. Besides, method and error do need to be accessible.
(Personally I prefer making Object require returnClass() and remove BaseObject interface.)
Currently we have two interfaces to represent objects in Goby. One is
Object
which represents any internal objects in the vm. The other one isBaseObject
, which represents objects that can be accessed in Goby, likeString
,Integer
.And these two interface is sort of duplicated, their only difference is that
BaseObject
requires structs to havereturnClass()
method. This makesmethod
anderror
can't beBaseObject
, which means if we make these two structs have class then we can remove one of the interface. Besides,method
anderror
do need to be accessible.(Personally I prefer making
Object
requirereturnClass()
and removeBaseObject
interface.)What do you think? @adlerhsieh @janczer