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
As a user of goboscript I have found the struct system very convenient for handling objects with multiple values. However, these often go into functions which can get very messy - especially the struct that represents a complex number.
Since goboscript compiles to scratch code, an implementation of OOP would be quite inefficient in the scratch editor. This is why I suggest classes in goboscript that behave exactly like a struct with associated methods (procs/functions). This means that the classes will not be able to directly support attribute assignment unless held in a variable (just like structs).
But what about normal OOP..?
In the future, it could be possible to support a conventional (and slow) OOP system using JSON and a list which acts as memory, allowing for object creation/deletion.
As a user of goboscript I have found the struct system very convenient for handling objects with multiple values. However, these often go into functions which can get very messy - especially the struct that represents a complex number.
Since goboscript compiles to scratch code, an implementation of OOP would be quite inefficient in the scratch editor. This is why I suggest classes in goboscript that behave exactly like a struct with associated methods (procs/functions). This means that the classes will not be able to directly support attribute assignment unless held in a variable (just like structs).
But what about normal OOP..?
In the future, it could be possible to support a conventional (and slow) OOP system using JSON and a list which acts as memory, allowing for object creation/deletion.theoretical code:
The text was updated successfully, but these errors were encountered: