Replies: 8 comments
-
|
I think type should be set in the constructor. |
Beta Was this translation helpful? Give feedback.
-
How getters will look then? |
Beta Was this translation helpful? Give feedback.
-
names are temporary to illustrate the idea |
Beta Was this translation helpful? Give feedback.
-
|
Will the getter opcode be able in every case to distinguish return parameter type and validate it? Especially float and int types. |
Beta Was this translation helpful? Give feedback.
-
|
addition string containers return a pointer. |
Beta Was this translation helpful? Give feedback.
-
I wouldn't care in runtime. you provide a 32-bit variable and runtime either copies the value (if it's int or float) or returns a pointer if it's a string, or other object. validation can be done in compiler or linter |
Beta Was this translation helpful? Give feedback.
-
|
runtime should keep track of created containers and delete them / free memory when the script ends (on game reload) |
Beta Was this translation helpful? Give feedback.
-
|
Should container space be continuous, or it could contain empty slots and support setting variables on arbitrary indexes? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Introduce data container feature and opcodes to support it.
Container instance is meant to store single kind of data type.
Available types: int, float, text
As far as it is technically possible types validation is performed in opcode commands at runtime. In case of mismatch error is thrown.
Class name: container
Opcodes:
Beta Was this translation helpful? Give feedback.
All reactions