You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only define the function methods in its class they're designated. This means Object:release() is only declared at Object record and not anywhere else for example. Thus requires user to cast at many places.
Define the parent function methods in the derived class too. This means Object:release() also declared at ByteData record for example.
Currently this definition does point 1, but I'd like to hear others opinion about this.
I'm not sure. I think approach 2 would be more ergonomic for the time being. However, approach 1 might be more future-proof, assuming that Teal will support some form of sub-typing at some point...
I believe @hishamhm was considering adding abstract interfaces to Teal? I think interfaces would work well for the Object example above.
Since Teal currently doesn't support inheritance (teal-language/tl#97, teal-language/tl#200), how does this definition handle with inheritance?
Object:release()
is only declared atObject
record and not anywhere else for example. Thus requires user to cast at many places.Object:release()
also declared atByteData
record for example.Currently this definition does point 1, but I'd like to hear others opinion about this.
CC @pdesaulniers
The text was updated successfully, but these errors were encountered: