3 ms·
Sounds interesting. However, it seems...cumbersome? to define for each code block the relation with each data structure. Maybe if you can abstract a "code block
by zademn 3y ago
Sounds interesting. However, it seems...cumbersome? to define for each code block the relation with each data structure. Maybe if you can abstract a "code block type" and build relations between that type and some data.
Something like
struct Player{
int rwo hp;
int rwo damage;
Vec<Items> rwo inventory;
}
codeblock hpSomething{
uses rw Player.hp;
uses r Player.inventory;
}
int main(){
// init player that fought something
hpSomething {
// read a potion and heal
potion = player.inventory.potion.value;
player.hp += potion;
}
}