What's the point of having a lot of this kind of writing in the code? #3419
-
Checklist
Is your feature request related to a problem?
why write like this? Is it possible to construct a solution with the existing API?why write like this Describe the solution you'd like to see.why write like this |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This seems like a general question, probably better targetted as a discussion, converting |
Beta Was this translation helpful? Give feedback.
-
It is to declare that a type conforms to an interface - so you get compile errors if the object fails to implement a method of the interface. // Declare conformity with CanvasObject interface |
Beta Was this translation helpful? Give feedback.
-
thank you, I Understood it now |
Beta Was this translation helpful? Give feedback.
It is to declare that a type conforms to an interface - so you get compile errors if the object fails to implement a method of the interface.
Normally in Fyne code you will see a comment with it like:
// Declare conformity with CanvasObject interface