-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature - CLEO Containers #204
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? |
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:
The text was updated successfully, but these errors were encountered: