Repository navigation
Replies: 8 comments
|
I think type should be set in the constructor. |
How getters will look then? |
names are temporary to illustrate the idea |
|
Will the getter opcode be able in every case to distinguish return parameter type and validate it? Especially float and int types. |
|
addition string containers return a pointer. |
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 |
|
runtime should keep track of created containers and delete them / free memory when the script ends (on game reload) |
|
Should container space be continuous, or it could contain empty slots and support setting variables on arbitrary indexes? |
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:
All reactions